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