I want to build a script getting 2 lists (same size) from the user, L1 and L2, and build a dictionary: each object from L1 is a key, and each object from L2 is the value (for same index)
I'm trying to make a combined list first, in order to use the dict() function.
here is my script. It runs, but prints nothing. I want to print just to make sure I get build the right list to apply the dict() function to...
print 'enter 2 lists with same len:'
L1=input('enter first list:')
L2=input('enter second list:')
if len(L1)==len(L2) and isinstance(L1,list) and isinstance(L2, list):
D_list=[]
D_ij=[]
for i in L1:
if isinstance (i,(int, str)):
for j in L2:
if isinstance(j, (tuple, list)):
for i in L1:
for j in L2:
D_ij=[L1[i], L2[j]]
D_list.extend([D_ij])
print D_list
else: print 'error'