How to test number in python code example Example 1: check integer number python N.is_integer() Example 2: python is integer (1.23).is_integer() # Returns false