[ create a new paste ] login | about

Link: http://codepad.org/xfystd8u    [ raw code | output | fork ]

aaronla - Python, pasted on Sep 4:
1
2
3
4
5
6
7
8
9
10
11
12
# slow.py

import time
from random import shuffle
a = [i for i in range(300000)]
shuffle(a)
sum = 0
t1 = time.time()
for i in a:
    sum = sum + i
t2 = time.time()
print t2-t1


Output:
1
0.429727077484


Create a new paste based on this one


Comments: