Convert upper case letters to lower case

0 votes
In a script which reads the input and than lists it, i want it to convert upper case letters to lower case, how can i do that?

for the following code:

 for words in text.readlines():
    sentence = [w.strip(',.') for w in line.split() if w.strip(',.')]
    list.append(sentence)
Nov 21, 2018 in Python by ana1504.k
• 7,890 points
51 views

1 answer to this question.

0 votes
You can convert upper case to lower case using the following :

w.strip(',.').lower()
answered Nov 21, 2018 by SDeb
• 13,230 points

Related Questions In Python

0 votes
1 answer

How to convert string in Pandas Series to lower case?

Suppose you have the series stored in ...READ MORE

answered May 13, 2019 in Python by Raj
832 views
+1 vote
1 answer

How to print first character of each word in upper case of a string in Python

You can use split() using space as ...READ MORE

answered Jun 1, 2018 in Python by george
• 200 points
3,765 views
+1 vote
5 answers

convert string to int python

Using list comprehensions: t2 = [map(int, list(l)) for ...READ MORE

answered Oct 18, 2018 in Python by donald
120 views
0 votes
1 answer

convert integer to strings

Yes, you can str() function. For example: a=10 str(a) output-'1 ...READ MORE

answered Jun 25, 2018 in Python by code.reaper12
• 3,470 points
42 views
0 votes
1 answer
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 777 views
0 votes
0 answers
0 votes
1 answer

How to convert string into epoch time?

you are passing the parsed datetime object to ...READ MORE

answered Sep 21, 2018 in Python by SDeb
• 13,230 points
989 views
0 votes
1 answer

How do I convert a Python program to a runnable .exe Windows program?

Understand that every 'freezing' application for Python ...READ MORE

answered Oct 12, 2018 in Python by SDeb
• 13,230 points
100 views