dimanche 30 décembre 2018

How to create a list with a random number of random integers in Python

I want to create a list that is a random length of randomly chosen integers. What I have so far is: a = [random.randint, random.randint, random.randint] and it goes on, but I want it so that it isn't however many times I typed "random.randint", but it uses the random function to generate a random number of random integers.




Aucun commentaire:

Enregistrer un commentaire