How to find the value closest to positive infinity in Python?

PythonServer Side ProgrammingProgramming

Although infinity doesn't have a concrete representation, the closest number to infinity is represented as return value of float() function with 'inf' as argument

>>> a=float('inf')
>>> a
inf


raja
Published on 06-Mar-2018 18:57:53
Advertisements