How to convert elements in a list of list to lowercase?

后端 未结 3 1481
既然无缘
既然无缘 2021-01-16 09:04

I am trying to convert the elements of a list of list of lowercase. This is what is looks like.

print(dataset)
[[\'It\', \'went\', \'Through\', \'my\', \'shi         


        
3条回答
  •  佛祖请我去吃肉
    2021-01-16 09:25

    If you wish to convert all the Strings in your list in Python, you can simply use following code:

    [w.lower() for w in My_List]
    

    My_List is your list name

提交回复
热议问题