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