I have a function:
def foo(a, b):
return [a, b]
I want to add type hinting for return value, as you can see my function can return [srt, int] or [str, str] or [int, int] etc. for example.
I tried:
def foo(a, b) -> List[str, int]:
return [a, b]
but it not working.
How can I specify possible value in list that my function can return?