Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Created June 13, 2020 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuongmep/3b34f84691bb88ceda752360bd0a8d65 to your computer and use it in GitHub Desktop.
Save chuongmep/3b34f84691bb88ceda752360bd0a8d65 to your computer and use it in GitHub Desktop.
mylist = IN[0]
i, seen, result = mylist, set(), []
for _index, item in enumerate(i):
if item not in seen:
seen.add(item)
else:
result.append(_index)
OUT = result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment