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

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


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

>>> max('helloworld')
'w'
>>>max(‘stripedzebra’)
‘z’