You are here : python_2stringstringmax

string.max() - string

             

The method max() returns the max alphabetical character from the string str.


  • str -- This is the string from which max alphabetical character needs to be returned.


Syntax

max(str)


Example

#!/usr/bin/python

str = "this is really a string example....wow!!!";
print "Max character: " + max(str)

str = "this is a string example....wow!!!";
print "Max character: " + max(str)


Output / Return Value

When we run above program, it produces following result −


Max character: y Max character: x


Limitations


Alternatives / See Also


Reference