import time # time.time()
import random # random.random()
d=[]
start=time.time()
for i in range(1000000):
d.append( random.random() )
stop=time.time()
print(f"operation took {stop-start} seconds")
print(d[0:3])
To embed this project on your website, copy the following code and paste it into your website's HTML: