By passing certain strings to the float constructor, we can create the special floating point value NaN (short for Not a Number) and also positive and negative infinity:
>>> float("nan")nan>>> float("inf")inf>>> float("-inf")-inf