Merge dictionnaries

    0

    4

    Python public recipes

    Shortcut: dict.merge

    def merge_two_dicts(dict1, dict2):
      new_dict = dict1.copy()
      new_dict.update(dict2)
      return new_dict
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.