Skip to content

Instantly share code, notes, and snippets.

@tjarratt
Last active July 19, 2023 15:06
Show Gist options
  • Save tjarratt/a4c2d86e15136f7782275cc7cafca9cc to your computer and use it in GitHub Desktop.
Save tjarratt/a4c2d86e15136f7782275cc7cafca9cc to your computer and use it in GitHub Desktop.
Basic set implementation in python
class ListSet:
def __init__(self):
self._values = []
self.__index = 0
def add(self, value):
if value in self._values:
return
self._values.append(value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment