import os
a = {'samsungGalaxy+Nexus': '33', 'alpsKPT+I5': '1', 'samsungGT-I9003': '1', 'dellDell+V04B': '1', 'samsungGT-I9000': '5', 'lenovoIdeaTabA2109A': '3', 'huaweiT8620': '1', 'unknownsoaiy': '1'}
b = ['samsungGalaxy+Nexus', 'alpsKPT+I5', 'samsungGT-I9003', 'teclastP88%28H3D7%29', 'rockchiprk30sdk', 'viewsonicN1010']
# IF SAME APPEND TO DICT C,ELSE TO LIST D
sameList = []
for keys in a.keys():
if keys in b:
sameList.append((keys, a[keys]))
a.pop(keys)
b.remove(keys)
dictSame = dict(sameList)
print "Same:n%s" % dictSame
print "Different:n%s" % a
os.system("pause")