how to check complex number in python code example Example: python check if number is complex >>> isinstance(1j, complex) True