Dec-02-2022, 02:42 PM
Hi,
i have the following code:
do you know what can it be ?
i have the following code:
import random def newlist(x): y = [] for i in x: if i not in y: y.append(i) return y a = [] for i_nd in range(0, 1000): n = random.randint(0, 100) a.append(n) print(newlist(a))and for some reason, even though i indicated in
for i_nd in range(0, 1000):
a range from 0 to 1000 - it only gives me 100 numbers....(when what i want is 1,000 numbers in the range from 0 to 100)do you know what can it be ?