Latest web development tutorials

Metodo Python max ()

stringhe Python stringhe Python


descrizione

Python max () restituisce una stringa nelle più grandi lettere.

grammatica

max () metodo di sintassi:

max(str)

parametri

  • str - una stringa.

Valore di ritorno

Restituisce una stringa in lettere più grandi.

Esempi

L'esempio seguente mostra il massimo () per usare:

#!/usr/bin/python

str = "this is really a string example....wow!!!";
print "Max character: " + max(str);

str = "this is a string example....wow!!!";
print "Max character: " + max(str);

Esempi dei risultati di output di cui sopra sono i seguenti:

Max character: y
Max character: x

stringhe Python stringhe Python