x = {"a":1,"b":2}                                          
  2 y = {"c":3}
  3 from collections import Counter
  4 X,Y = Counter(x),Counter(y)
  5 z = dict(X+Y)
  6 print(z)

程序运行结果

{'a': 1, 'b': 2, 'c': 3}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2021-08-04
相关资源
相似解决方案