Create dictionary from lists

    0

    10

    Python public recipes

    Create a dictionary from two lists

    keys = ['a', 'b', 'c']
    values = [1, 2, 3]
    dictionary = dict(zip(keys, values))
    # {'a': 1, 'b': 2, 'c': 3}
    
    # keys = ['a', 'b', 'c']
    # values = [1, 2, 3]
    dictionary = dict(zip(keys, values))
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.