I am trying to sort a list which has 3 dictionaries.
l = [
{'Index': 3},
{'Index': 1},
{'Index': 2}
]
sorted(l, key=lambda l:l['Index'])
print(l)
what I expected for answer is
[{'Index': 1}, {'Index': 2}, {'Index': 3}]
but the actual answer is
[{'Index': 3}, {'Index': 1}, {'Index': 2}]
where should I fix the code for the answer?