I have list of dict from which I need to convert all the dict values into list of list without changing the order.
I used empty list and tried to append dict values using for loop but its not in order.
For example:
result = [{'Project': 'ABC','Employee': 'MNK','Project': 'ABC','Project': 'ABC'}]
I want in below format:
answer = [['ABC'],['MNK'],['ABC'],['ABC']]
I used below code:
answer =[]
for i,j in enumerate(result):
answer .append(result[i].values())
What I got is
answer = [['MNK'],['ABC'],['ABC'],['ABC']]
Expected answer is
answer = [['ABC'],['MNK'],['ABC'],['ABC']]
Note: I am looking for code which gives expected answer, I checked other questions, none of them related to this. Right suggestions and codes are accepted. Thanks.