Answers for "python .lowercase"

4

how to lowercase list in python

[x.lower() for x in ["A","B","C"]]
['a', 'b', 'c']

>>> [x.upper() for x in ["a","b","c"]]
['A', 'B', 'C']

>>> map(lambda x:x.lower(),["A","B","C"])
['a', 'b', 'c']
>>> map(lambda x:x.upper(),["a","b","c"])
['A', 'B', 'C']
Posted by: Guest on May-06-2020
5

convert string to lowercase in python

str = 'HELLO'
print(str.lower())

#prints "hello"
Posted by: Guest on February-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language