Friday, March 9, 2018

String min() Method


String min() Method in Python 3


The min() method returns the min alphabetical character from the string str.

Syntax
min(str)

Parameters
 str - This is the string from which min alphabetical character needs to be returned.
Return Value
This method returns the max alphabetical character from the string str.

Example
#!/usr/bin/python3
str = "www.tutorialspoint.com"
print ("Min character: " + min(str))
str = "TUTORIALSPOINT"
print ("Min character: " + min(str))

Result
Min character: .
Min character: A