# Union typing can be used like this: Union[int, str] # In function defintion it would look like this: def func(x: Union[int, str]) -> Union[int, str]: ...
x = {"apple", "banana", "cherry"} y = {"google", "microsoft", "apple"} z = x.union(y)