python if var is type string code example Example: check type of variable in python str = "Hello" type(str)