Wednesday, July 15, 2015

Program to remove duplicate elements from list


list=[1,2,3,4,5,1,2,3,4,5,99,99]
newlist=[]

j=0
def removeduplicate(list):
    for item in list:
        if item not in newlist:
            newlist.append(item)
          
removeduplicate(list)
print newlist