Dec-30-2016, 06:36 AM
(This post was last modified: Dec-30-2016, 07:53 AM by MeeranRizvi.)
i did with dictionary
a = [1,2,3,2,4,2,4,3,5,5,1] result = dict((i, a.count(i)) for i in a) print resultI just got the counts but how to print only the int that appears an odd no of times
Output:{1: 2, 2: 3, 3: 2, 4: 2, 5: 2}