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,900 points
120 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,270 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
1,464 views
+1 vote
2 answers

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

class Solution:     def firstAlphabet(self, s):             self.s=s              k=''              k=k+s[0]              for i in range(len(s)):                     if ...READ MORE

answered Oct 28, 2020 in Python by Anurag
7,106 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
258 views
0 votes
1 answer

convert integer to strings

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

answered Jun 25, 2018 in Python by code.reaper12
• 3,500 points
91 views
0 votes
2 answers
+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 1,986 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,270 points
3,443 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,270 points
482 views