Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Short solution in Creative category for Non-unique Elements by inovitsky
#Your optional code here
#You can import some modules or create additional functions
def checkio(data):
#Your code here
#It's main function. Don't remove this function
#It's used for auto-testing and must return a result for check.
return [item for item in data if data.count(item)>1]
#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
April 23, 2014