How to compare list and dictionary in Python???
Posted: Fri Nov 18, 2016 11:24 am
dictionary = {0: 'zero', 1: 'one', 2: 'two', 3: 'three'}
list1 = [zero, one, two]
I want to delete the entry '3:three' from the dictionary since it is not in the list. I am retaining only the common entries in the list. How can I do it???
list1 = [zero, one, two]
I want to delete the entry '3:three' from the dictionary since it is not in the list. I am retaining only the common entries in the list. How can I do it???