-4

I have two list of same length l1=[reboot,revision,disk_space] and l2=[no,12.15,4300] I want to make these two list as key-value map. Output should be like this [reboot:no,revision:12.18,disk_space:4300].. I tried Zip it is not working

Cristian Lupascu
  • 39,078
  • 16
  • 100
  • 137

1 Answers1

0

You can create a dictionary from the output of zip (Thanks, Martijn!):

print dict(zip(l1, l2))
Cristian Lupascu
  • 39,078
  • 16
  • 100
  • 137