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