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