Combining two dictionaries into one [duplicate]

both = {}
one = {"A" : 0}
two = {"B" : 0}
both.update(one)
both.update(two)
print one
print both

Leave a Comment