vendredi 14 août 2020

Python random list generation of repeating numbers [closed]

I need to create a list of random numbers between the values 1 to 10 and the list has to be 2442 numbers. The numbers can repeat but just random.

I have tried is : def ran_gen(): for x in range(623): list_1 = [] a = [random.sample(range(10),10)] list_1.append(a)




Aucun commentaire:

Enregistrer un commentaire