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