Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add key value in each dictonary in the list

result = [dict(item, **{'elem':'value'}) for item in myList]
 
PREVIOUS NEXT
Tagged: #add #key #dictonary #list
ADD COMMENT
Topic
Name
5+6 =