mercredi 22 septembre 2021

Python random module, instead of different generated numbers show the same one [duplicate]

import random

def randColumnRow():
    b = [random.randint(1, 1000) for i in range(8)]
    return b


print(randColumnRow())

I have this programm, the output shows 8 different numbers between 1 and 1000. How do i change it to show me the same number 8 times?




Aucun commentaire:

Enregistrer un commentaire