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