fork(1) download
  1. # your code goes here
  2.  
  3.  
  4. a = {'a':2}
  5. b = {'b':3}
  6. c = {'c':3}
  7. foo = {**a, **b, **c}
  8.  
  9. print(foo)
  10.  
  11. def merge_dicts(*args):
  12. foo = {}
  13. for d in args:
  14. foo.update(d)
  15. return foo
  16.  
  17. print(merge_dicts(a,b,c))
Success #stdin #stdout 0.02s 9136KB
stdin
Standard input is empty
stdout
{'a': 2, 'b': 3, 'c': 3}
{'a': 2, 'b': 3, 'c': 3}