I have a list of dictionaries, and want to add a key for each element of this list. I tried:
result = [ item.update({"elem":"value"}) for item in mylist ]
but the update method returns None, so my result list is full of None.
result = [ item["elem"]="value" for item in mylist ]
returns a syntax error.