PEP 604 (draft) proposes this:
def f(list: List[int | str], param: int | None) -> float | str:
pass
f([1, "abc"], None)
https://www.python.org/dev/peps/pep-0604/