Editor settings

General settings

Save settings

Learn to program with Python

Make a string lowercase #

You can convert a string to lowercase using the lower() function. This method returns a new string in which all the characters are converted to lowercase.

Here's an example:

my_string = "PYTHON IS THE EASIEST LANGUAGE TO LEARN."
lowercase_string = my_string.lower()
print(lowercase_string) # Output: python is the easiest language to learn.

Exercise #

  • Use the lower() function to make all the characters in the variable lowercase_string lowercase
  • Do not change the first line of code
Output will be displayed here