jeudi 22 juin 2017

How do I generate a random list WITH REPETITION in Python?

I want to generate a random list with repetition and I do not know how it is done, because it always gives me error, I write this:

  1. x=rm.sample(range(1001), 2000)
  2. print(x)

I want a list of 2000 numbers between 1 and 100

Help me pls.




Aucun commentaire:

Enregistrer un commentaire