check if item is string python code example Example: is instance string python isinstance(x, int) isinstance(s, str)