Python Program to convert a string to lower case

By | August 16, 2019

Task: Write a Python program to input a string and convert it into lower case string.

The Source code of Python Program to Convert string into lower case

# Write a Python program to
# input a string and change into
# lower case string
# The user will enter String
# during program execution

# display message to enter string
# and get input string
str1 = input("Enter a string to convert into lower case:")


# use lower() method
lower_string = str1.lower()

# now print UPPER CASE string
print(str1, "in lower case =", lower_string)

Output of the program

Enter a string to convert into lower case:HELLO Python
HELLO Python in lower case = hello python

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *