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
Post a Comment