Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

append dictionary to list python

a_dictionary = {"name" : "John", "age" : 20}
a_list = []

dictionary_copy = a_dictionary.copy()
a_list.append(dictionary_copy)

print(a_list)
 
PREVIOUS NEXT
Tagged: #append #dictionary #list #python
ADD COMMENT
Topic
Name
2+9 =