How to convert my dict value in a list?
Input
My_dict={{'x':112,'y':987,'z':56},{'x':12,'y':97,'z':516},{'x':1912,'y':7,'z':26},...}
Output
My_list=[[112,987,56],[12,97,516],[1912,7,26],...]
How to convert my dict value in a list?
Input
My_dict={{'x':112,'y':987,'z':56},{'x':12,'y':97,'z':516},{'x':1912,'y':7,'z':26},...}
Output
My_list=[[112,987,56],[12,97,516],[1912,7,26],...]
Most likely you meant
my_list_of_dicts =[{'x':112,'y':987,'z':56},
{'x':12,'y':97,'z':516},
{'x':1912,'y':7,'z':26}]
Because the data structure is not correct for your My_dict
.
If so, you can use list comprehension as below
[list(inner_dict.values()) for inner_dict in my_list_of_dicts]