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