Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 263 Bytes

list_to_dict.md

File metadata and controls

13 lines (7 loc) · 263 Bytes

Write a Python program to convert list to dictionary.

color = ["Black", "Red", "Maroon", "Yellow"] hex_code = ["#000000", "#FF0000", "#800000", "#FFFF00"]

Output

{"Black": "#000000", "Red": "#FF0000", "Maroon": "#800000", "Yellow": "#FFFF00"}