The Wayback Machine - https://web.archive.org/web/20230512160716/https://www.geeksforgeeks.org/python-string-min/
Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Python String | min()

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

min() is an inbuilt function in Python programming language that returns the minimum alphabetical character in a string.

Syntax:

min(string)

Parameter:
min() method takes a string as a parameter

Return value:

Returns a character which is alphabetically the lowest character in the string.

Below is the Python implementation of the method min()




# python program to demonstrate the use of 
# min() function 
  
# minimum alphabetical character in 
# "geeks" 
string = "geeks" 
print(min(string))
  
# minimum alphabetical character in 
# "raj"
string = "raj" 
print(min(string))

Output:

e
a
My Personal Notes arrow_drop_up
Last Updated : 07 Jan, 2018
Like Article
Save Article
Similar Reads
Related Tutorials