2 ways to transform 2 lists into Python dictionary 🐍 #shorts #python

preview_player
Показать описание
In this video, we'll show you 2 ways to transform 2 lists into a Python dictionary. The both involve using zip(l1,l2) to combine the lists.
1. dict(zip(l1,l2)
2. {key:value for key,value in zip(l1, l2)
Рекомендации по теме