Trouble to create a list without duplicates
Maybe I made a very naive mistake but when I try to create a list without duplicates It doesn't work and I can't figure it out why... While the same piece of code works perfectly in a Python interpretor.
There is my code :
for item in range (1,(var.Level +1)):
var.r = random.randint(1,9)
if var.r not in var.x: "<-- Here is my problem. It seams that the test is not done"
When I print var.x sometimes I have duplicates.
Does someone has an idea about this problem ?
Thanks in advance,