Ok the changes you suggested:
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
Is there something that i miss?
import random mylist = [] for i in range(10): x = random.randint (1,30) if x not in mylist: mylist.append(x) for x in mylist: print(mylist)This is the output:
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
[16, 4, 11, 15, 13, 14, 30, 18, 1]
Is there something that i miss?