Python String lower method with Example – Python Tutorial

1 year ago Lalit Bhagtani 0

 In this tutorial, we will learn about python string lower method.
Python String Lower

lower method :

This method returns a copy of the string in which all the cased characters are converted to lowercase.

Syntax : < String Object >.lower( ) :  < String Object >

Example:

[datacamp_exercise lang=”python” height=”250″ min-height=”200″ max-height=”300″]
[datacamp_pre_exercise_code]

[/datacamp_pre_exercise_code]
[datacamp_sample_code]
# create one string and assign it to variable s
s = ‘LOWER’

# call lower() method on string s
output = s.lower()

# print the value of variable output
print(output)
[/datacamp_sample_code]
[datacamp_solution]

[/datacamp_solution]
[/datacamp_exercise]

References :-

  1. lower() method Docs

That’s all for Python String lower method. If you liked it, please share your thoughts in comments section and share it with others too.

Previous