Source Code:
(back to article)
x = 5 print(isinstance(x, int)) # Output: True print(isinstance(x, str)) # Output: False y = "hello" print(isinstance(y, str)) # Output: True
Result:
Report an issue