Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Non-unique Elements by xavierskip
#Your optional code here
#You can import some modules or create additional functions
def checkio(data):
d=[]
for i in data:
if data.count(i)>1:
d.append(i)
return d
#Some hints
#You can use list.count(element) method for counting.
#Create new list with non-unique elements
#or remove elements from original list (but it's bad practice for many real cases)
#Loop over original list
#These "asserts" using only for self-checking and not necessary for auto-testing
May 22, 2014