# keys = ['a', 'b', 'c']
      # values = [1, 2, 3]
      dictionary = dict(zip(keys, values))
      
      Python language logo

      Create dictionary from lists

      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}
      

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.