What is the output of print(float('inf')) in Python?
print(float('inf'))
Correct answer
D. inf
7 views
D. inf
7 views
float('inf') represents positive infinity.
Asked in: Python Interview Output Prediction
https://docs.python.org/3/reference/datamodel.htmlNot sure why the answer is D? Ask here and get an explanation.