Computer >> Computer tutorials >  >> Programming >> Python

How to get min alphabetical character from the string in Python?


You can use the min method on a string to get the minimum alphabetical character from the string. You can use it as follows:

>>> min('helloworld')
'd'
>>> min(‘TAJMAHAL’)
‘A’