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

Python3 max() Method

Python3 max() Method

Python3 Strings Python3 Strings


Description

The max() method returns the largest letter in a string.

Syntax

max() method syntax:


max(str)

Parameters

Return Value

Returns the largest letter in the string.

Example

The following example shows how to use the max() function:


#!/usr/bin/python3

str = "runoob"
print ("最大字符: " + max(str))

The output of the above example is:


最大字符: u

Python3 Strings Python3 Strings