I am generating serials using random and a base. (see example below)
import random
charList = ["A", "B", "C", "D", "C", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "1", "2", "3", "4", "5"
"6", "7", "8", "9"]
def Z150(charList):
return "1841GG001Z" + random.choice(charList) + "8" + " -> Z150 Speakerset"
for i in range(100):
print(Z150(charList))
Now, there's a very likely chance that there will be duplicates, how would I find the duplicates and remove them?
I have seen ways to do this but nothing that checks the outputs of the prints and then deletes the duplicates (if that makes sense)