def f(x, types=(int, str)): print(isinstance(x, types))