Python3 min() Method

Python3 字符串Python3 Strings


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));

The output of the above example is as follows:

最小字符: b

Python3 字符串Python3 Strings

Other extensions