Code:
def remove_duplicates(xlist):
    new_list = []
    return [x*y for x,y in xlist if y not in new_list.iteritems()]

print remove_duplicates([4,5,5,6])
i am trying to remove repeating numbers from a list that can be any size. but when I test out this idea i hit a brick wall. I get TypeError: 'int' object is not iterable. I have tried several alternatives as a single liner but was unsuccessful. Please can somone...