Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python join two lists as dictionary

# using zip()
# to convert lists to dictionary

# initializing lists
test_keys = ["Rash", "Kil", "Varsha"]
test_values = [1, 4, 5]
  
res = dict(zip(test_keys, test_values))
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #python #join #lists #dictionary
ADD COMMENT
Topic
Name
8+5 =