object is a string? python code example Example: is instance string python isinstance(x, int) isinstance(s, str)