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,910 points
549 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,300 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
2,288 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
11,711 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
1,256 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 26, 2018 in Python by code.reaper12
• 3,500 points
307 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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,023 views
0 votes
1 answer
0 votes
1 answer

How to convert string into epoch time?

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

answered Sep 22, 2018 in Python by SDeb
• 13,300 points
6,165 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 13, 2018 in Python by SDeb
• 13,300 points
1,234 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP