Python string method min() returns the min alphabetical character from the string str.
Following is the syntax for min() method −
min(str)
str − This is the string from which min alphabetical character needs to be returned.
This method returns the min alphabetical character from the string str.
The following example shows the usage of min() method.
#!/usr/bin/python str = "this-is-real-string-example....wow!!!"; print "Min character: " + min(str) str = "this-is-a-string-example....wow!!!"; print "Min character: " + min(str)
When we run above program, it produces following result −
Min character: ! Min character: !