Create a global variable called myUniqueList. It should be an empty list to start.
Next, create a function that allows you to add things to that list. Anything that’s passed to this function should get added to myUniqueList, unless its value already exists in myUniqueList. If the value doesn’t exist already, it should be added and the function should return True. If the value does exist, it should not be added, and the function should return False;
extra is if we can make the remaining values to a list called my leftovers
myUniqueList = ()
myLeftovers = ()
def addUniqueElement(b):
if b not in myUniqueList:
print(myUniqueList.append(b))
return True
else:
myLeftovers.append(newElement)
return False
print(addUniqueElement())