I have a list of dictionaries, and I want to use it to create another list of dictionaries, slightly amended.
Here's what I want to do:
entries_expanded[:] = [{entry['id'], myfunction(entry['supplier'])} for entry in entries_expanded]
So I end up with another list of dictionaries, just with one entry altered.
The syntax above is broken. How can I do what I want?
Please let me know if I should expand the code example.