close

How to convert a List to Lowercase in Python

Hello guys. How are you all? I hope you all fine. In this tutorial we will learn about how to convert a List to Lowercase in Python. so without wasting time lets learn about of this.

How to convert a List to Lowercase in Python

  1. convert a List to Lowercase in Python

    to convert a List to Lowercase in Python just use map(). By using map() you can convert a list to Lowercase in python. it is a very easy way to do it. So lets learn about of this without wasting time by given below example: lst = ["PIzZa","BurGEr","DHOsA"] var1 = (map(lambda x: x.lower(), lst)) result = list(var1) print(result) Output : ['pizza', 'burger', 'dhosa']

  2. How to convert a List to Lowercase in Python

    to convert a List to Lowercase in Python just Use List comprehension. By using list comprehension you can convert a list to Lowercase in python. it is a very easy way to do it. So lets learn about of this without wasting time by given below example:
    lst = ["PIzZa","BurGEr","DHOsA"] result = [x.lower() for x in lst] print(result) Output : ['pizza', 'burger', 'dhosa']

  3. python lowercase list

    To convert a List to Lowercase in Python just use map(). By using map() you can convert a list to Lowercase in python. it is a very easy way to do it. So lets learn about of this without wasting time by given below example: lst = ["PIzZa","BurGEr","DHOsA"] var1 = (map(lambda x: x.lower(), lst)) result = list(var1) print(result) Output : ['pizza', 'burger', 'dhosa']

Method 1: convert a List to Lowercase Using map()

By using map() you can convert a list to Lowercase. it is a very easy way to do it. So lets learn about of this without wasting time by given below example:

lst = ["PIzZa","BurGEr","DHOsA"]
var1 = (map(lambda x: x.lower(), lst))
result = list(var1)
print(result)

Output :

['pizza', 'burger', 'dhosa']

Method 2: Use List comprehension 

By using list comprehension you can convert a list to Lowercase. it is a very easy way to do it. So lets learn about of this without wasting time by given below example:

lst = ["PIzZa","BurGEr","DHOsA"]
result = [x.lower() for x in lst]
print(result)

Output :

['pizza', 'burger', 'dhosa']

Conclusion

It’s all About this Tutorial. Hope all methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which method worked for you?

Also, Read

Leave a Comment