28: Program to Lowercase a String in Python

To Lowercase a String in Python you can make use of the built-in lower() method from the String class.

Let's take a look at an example.

Example 1:
input_string = "Code2care - Line's of code for change!"
lowercase_string = input_string.lower()
code2care - line's of code for change!


str.lower(): https://docs.python.org/3/library/stdtypes.html#str.lower

Return a copy of the string with all the cased characters converted to lowercase.

Example 2:
Python Program Lowercase String

Facing issues? Have Questions? Post them here! I am happy to answer!

Author: Rakesh
Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

Copyright © Code2care 2023 | Privacy Policy | About Us | Contact Us | Sitemap