Python3 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:
Example
#!/usr/bin/python3
str
=
"runoob"
;
(
"Smallest character: "
min
(
str
)
)
;
The output of the above example is:
最小字符: b
Python3 Strings