Join Regular Classroom : Visit ClassroomTech

Python String – min() function

It is an inbuilt function in python that returns the alphabetical character with the lowest ascii value.

Syntax:

min(string)

Example 1:

s = “codewindow
x = min(s)
print(x)

Output:

c

Explanation:

Here the ascii value of “c” is the lowest among all other characters. Thus it returned “c”.

Example 2:

s = “CodeAndHustle!
x = min(s)
print(x)

Output:

!

Explanation:

Here the ascii value of “!” is the lowest among all other characters. Hence it returned “!”.

You Missed
Also Checkout