python check if var is of type <class 'str'> code example Example: if type is string python isinstance(s, str)