What is the output of min(‘infinity’) in Python
min() method returns the smallest item in an iterable.
The output of
min('infinity') is ‘
>>> min('infinity') 'f' >>>
Why the output of this command is ‘f’? It is because among the characters in ‘infinity’, f got the least ASCII value than other characters. Thus the output become ‘f’.
Please login to comment
View all comments