Hello, in short I am trying to keep a list in tact, but replace all duplicate values, besides the first duplicate, with a string like “X” or something similar.
For example, I am trying to take a list like this:
“1, 2, 3, 3, 4, 5, 6, 7, 7, 7, 8, 9, 10”
Into a single list like this:
“1, 2, 3, X, 4, 5, 6, 7, X, X, 8, 9, 10”
I would use Python for this. You could make an empty list, pass it through and if statement to check if each value is in the new list, then if not append it and if so append X instead.
I’m on my mobile but it’s be like this…
oldlist = IN[0]
newlist =
for i in oldlist:
if i in newlist:
newlist.append(“X”)
else:
newlist.append(i)