Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python loop append to dictionary

case_list = []
for entry in entries_list:
    case = {'key1': entry[0], 'key2': entry[1], 'key3':entry[2] }
    case_list.append(case)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #loop #append #dictionary
ADD COMMENT
Topic
Name
6+8 =