Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Python3 min() Method

Python3 min() Method

Python3 Strings Python3 Strings


Description

The Python min() method returns the smallest letter in a string.

Syntax

min() method syntax:


min(str)

Parameters

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"

;

print

(

"Smallest character: "

min

(

str

)

)

;

The output of the above example is:


最小字符: b

Python3 Strings Python3 Strings