Python String | max()
Last Updated :
08 Dec, 2021
max() is an inbuilt function in Python programming language that returns the highest alphabetical character in a string.
Syntax:
max(string)
Parameter:
max() method takes a string as a parameter
Return value:
Returns a character which is alphabetically the highest character in the string.
Below is the Python implementation of the method max()
Python
string = "geeks"
print max (string)
string = "raj"
print max (string)
|
Output:
s
r
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...