How Do You Generate 10,000 Random Numbers in a List in Python?

Problem scenario
You want to generate 10,000 random numbers in a tuple.  That is, you want a tuple with 10,000 numbers.  The numbers can be chosen at random.  How do you do this?

Solution
Run this program:
import random
coollist = []
for i in range(1000000):
   coollist.append(random.randint(1,100000))

Leave a comment

Your email address will not be published.