Best Answer · By JanBask Python Expert
Answered on Feb 15, 2021
In Python there is no way to represent infinity as an integer in Python. This matches the behaviour of many other languages. However, due to Python's dynamic typing system, you can use float('inf') in place of an integer, and it will behave as you would expect.