Skip to content

Instantly share code, notes, and snippets.

@adambene
Last active July 1, 2020 19:04
Show Gist options
  • Select an option

  • Save adambene/3723992a4b43a29876accbf50908e501 to your computer and use it in GitHub Desktop.

Select an option

Save adambene/3723992a4b43a29876accbf50908e501 to your computer and use it in GitHub Desktop.
Distinct items in list, naive and verbose implementation
def distinct_naive(items):
results = list()
for item in items:
if not item in results:
results.append(item)
return results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment