What is the output of min(‘infinity’) in Python
![what is the output of min('infinity') in python](https://pythonpoint.net/wp-content/uploads/2020/12/what-is-the-output-of-mininfinity-in-python-1024x576.jpg)
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