'Why when a string explicitly converted to float doesn't give an error?

This is the code: a = float("inf") print(a) print(type(a))

OUTPUT: inf <class 'float'>



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source