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