Something to note is that your attempt was very good. It did everything right except for a few things:
You should print out the list if you want to see the final list
eg.
print(myUniqueList)
Next, the function requires an argument, in this case, I'll use "cool"
so now we have
addUniqueElement("cool")
print(myUniqueList)
In the end we get
myUniqueList = []
myLeftovers = []
def addUniqueElement(b):
if b not in myUniqueList:
print(myUniqueList.append(b))
else:
myLeftovers.append(newElement)
addUniqueElement("cool")
print(myUniqueList)
print(myLeftovers)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…