why i can't reverse a list of list in python

后端 未结 5 580
不思量自难忘°
不思量自难忘° 2021-02-08 04:22

i wanted to do something like this but this code return list of None (i think it\'s because list.reverse() is reversing the list in place):

map(lambda row: row.r         


        
5条回答
  •  鱼传尺愫
    2021-02-08 04:35

    You can also simply do

    for row in figure:
        row.reverse()
    

    to change each row in place.

提交回复
热议问题