I'm trying to remove the duplicate from the list and count the list after removing the duplicates
seq = [[1,2,3], [1,2,3], [2,3,4], [4,5,6]] new_seq = [[1,2,3], [2,3,4], [4,5,6]] count = 3
My code takes around 23 seconds for around 66,000 lists in a list
How can I make my code faster?
def unique(seq): new_seq =  count = 0 for i in seq: if i not in new_seq: new_seq.append(i) count += 1 return count