Turning a list of dictionaries into a list of lists

前端 未结 4 1117
难免孤独
难免孤独 2021-01-20 22:55

I know this is possible with list comprehension but I can\'t seem to figure it out. Currently I have a list of dictionaries like so:

 [ {\'field1\': \'a\', \'fie         


        
4条回答
  •  不思量自难忘°
    2021-01-20 23:48

    I'm not sure what ordering you want, but for no order you could do:

    list_ = [list(_.values()) for _ in dict_list]
    

提交回复
热议问题