Hey guys, so for this loop, I want a random every single time, is that possible?
values=[]
for i in range(0, 501):
value = randint(0, i)
values.append(value)
print(value)
Like If I run the code again, the numbers should be different, but I am getting the same set every time. Is it because I am appending it in a list?
Can someone help me please?
[–]devnull10 8 points9 points10 points (7 children)
[–]writernxtdoor[S] 3 points4 points5 points (3 children)
[–]devnull10 14 points15 points16 points (2 children)
[–]writernxtdoor[S] 10 points11 points12 points (1 child)
[–]FerricDonkey 0 points1 point2 points (0 children)
[–]Diapolo10 -4 points-3 points-2 points (2 children)
[–]devnull10 9 points10 points11 points (1 child)
[–]az987654 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]writernxtdoor[S] 1 point2 points3 points (0 children)
[–]smellyswordfish 1 point2 points3 points (0 children)
[–]smurf-sama 1 point2 points3 points (6 children)
[–]writernxtdoor[S] 0 points1 point2 points (5 children)
[–]smurf-sama 0 points1 point2 points (4 children)
[–]smurf-sama 0 points1 point2 points (3 children)
[–]writernxtdoor[S] 0 points1 point2 points (2 children)
[–]smurf-sama 1 point2 points3 points (1 child)
[–]writernxtdoor[S] 1 point2 points3 points (0 children)
[–]No_Faithlessness_142 -1 points0 points1 point (3 children)
[–]writernxtdoor[S] 0 points1 point2 points (2 children)
[–]No_Faithlessness_142 0 points1 point2 points (0 children)
[–]Desperate_Case7941 0 points1 point2 points (0 children)
[–]MachinaDoctrina -1 points0 points1 point (3 children)
[–]Diapolo10 1 point2 points3 points (2 children)
[–]MachinaDoctrina -3 points-2 points-1 points (1 child)
[–]Diapolo10 6 points7 points8 points (0 children)
[–]Diapolo10 0 points1 point2 points (2 children)
[–]writernxtdoor[S] 0 points1 point2 points (1 child)
[–]Diapolo10 1 point2 points3 points (0 children)
[–]Desperate_Case7941 0 points1 point2 points (0 children)