0 votes
in Python Flask by
In one line, show us how you’ll get the max alphabetical character from a string.

1 Answer

0 votes
by
For this, we’ll simply use the max function.

>>> max('flyiNg')

‘y’

The following are the ASCII values for all the letters of this string-

f- 102

l- 108

y- 121

i- 105

N- 78

g- 103

By this logic, try to explain the following line of code-

>>> max('fly{}iNg')

‘}’

(Bonus: } – 125)
...