Sep 14, 2018

Build a dictionary from two related sequences in Python

>>> t1  =  ( 1 , 2 , 3 )  
>>> t2  =  ( 10 , 20 , 30 )  
>>> print ( dict ( zip ( t1 , t2 ))) 
{1: 10, 2: 20, 3: 30}