Python min() method
Description
The Python min() method returns the smallest letter in a string.
Syntax
min() method syntax:
min(str)
Parameters
- str -- a string.
Return Value
Returns the smallest letter in the string.
Example
The following example shows how to use the min() function:
#!/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);
The output of the above example is:
Min character: !
Min character: !
Python Strings