python - split dictionary into two lists , one list is for key, another list is for value -


i want split dictionary 2 lists. 1 list key, list value.

and should ordered original

original list:

[{"car":45845},{"house": 123}] 

expected result:

list1 = ["car", "house"]  list2 = [45845, 123] 

fixed_list = [x.items() x in list] keys,values = zip(*fixed_list) 

Comments

Popular posts from this blog

python - Mongodb How to add addtional information when aggregating? -

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

java - Incorrect order of records in M-M relationship in hibernate -