Python3 min() Method
Description
The Python min() method returns the smallest letter in the string.
Syntax
Syntax of the min() method:
min(str)
Parameters
- str -- A string.
Return Value
Returns the smallest letter in the string.
Examples
The following example demonstrates the usage of the min() function:
Example
#!/usr/bin/python3
str = "example";
print ("minimum character: " + min(str));
str = "example";
print ("minimum character: " + min(str));
The output of the above example is as follows:
最小字符: b
Other extensions
Python3 Strings