python check if variable is a type type code example Example: how to check the type of a variable in python print(type(x))