from typing import reveal_type def f[T](x: T) -> T: return x x = (1, "hello world") reveal_type(f(x)) # this is `tuple[int, str]` reveal_type(f((1, "hello world ...