What is the output of min(‘infinity’) in Python
The Python min()
method returns the smallest item in an iterable.
The output of min('infinity')
is ‘f
‘.
>>> 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’.
Subscribe
Login
Please login to comment
0 Discussion