0 votes
1 view
in Python by (27.5k points)

I have a script which reads the input and then lists it, however, I want it to convert upper case letters to lower case, how can I do that?

this is what I got

for words in text.readlines(): 

sentence = [w.strip(',.') for w in line.split() if w.strip(',.')] 


2 Answers

0 votes
by (67.1k points)

You can use str.lower(), it converts all cased characters to lowercase.

0 votes
ago by (20.3k points)

Try using the code given below:


For more information, you can refer to this link: