Speed up two for-loops? The code below is slow. Any thoughts on speeding up? 

dict1 = {}
dict2 = {}
list_needed  = []

for val in dict1.itervalues():
    for k,v in d1ct2.iteritems():
        if val == k:
            list_needed.append([val,v])
Perhaps,

for val in dict1.itervalues():
    if val in dict2:
       list_needed.append([val,dict2[val]])


This is similar to 

list_needed = [[val,dict2[val]] for val in dict1.itervalues() if val in dict2]


My preference would be to make [val,v] a tuple - i.e (val,v) which is an immutable D.S and hence would be faster than a list. But it may not count for much.