def merge_dicts(*dict_args):
""" Given any number of dicts, shallow copy and merge into a new dict, precedence goes to key value pairs in latter dicts. """
result = {}
for dictionary in dict_args:
result.update(dictionary)
return result
label=merge_dicts(label1,label2,label3,label4,label5,label6)
网友评论