May-04-2020, 09:29 AM
zip(types,raw)
create an iterator that produces tuples of the form (x, y)>>> >>> list(zip(types,raw)) [(<class 'str'>, 'yosi'), (<class 'int'>, ' 1'), (<class 'float'>, ' 3.14')] >>> for ty,val in zip(types,raw): ... print("ty:",ty,"val:",str(val)) ... ty: <class 'str'> val: yosi ty: <class 'int'> val: 1 ty: <class 'float'> val: 3.14