jeudi 3 octobre 2019

How to generate a random list of ints in Python3

My idea is as follows:

l=[]
for i in range(10):
    l.append(random.randint(0,100))

But is there a more convenient way to generate a random list of ints since I've import the random module?




Aucun commentaire:

Enregistrer un commentaire