how to check if the type of variable is not the same in python code example Example: if type is string python isinstance(s, str)