i'm looping through an array and changing its item by a random number between 1 and 10
from time import sleep as wait
from os import system as sys
import random
memory = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
def cls(): sys("cls")
def main():
for i in memory:
memory[i] = random.randrange(1,10)
print(memory)
wait(0.1)
cls()
print("OK")
input("")
if __name__ == '__main__':
main()
but it only changes the first item of the array
how can i fix this?