Skip to content
Related Articles

Related Articles

Improve Article

Python String | max()

  • Difficulty Level : Basic
  • Last Updated : 07 Jan, 2018

max() is an inbuilt function in Python programming language that returns the highest alphabetical character in a string.



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()

# pythin program to demonstrate the use of 
# max() function 
# maximum alphabetical character in 
# "geeks" 
string = "geeks" 
print max(string)
# maximum alphabetical character in 
# "raj"
string = "raj" 
print max(string)



 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course

My Personal Notes arrow_drop_up
Recommended Articles
Page :