fork download
  1. # your code goes here
  2. import time
  3. start = time.time()
  4. a=[]
  5. for i in range(100000): a.append(i)
  6.  
  7. end = time.time()
  8. print(end-start)
  9.  
  10. start = time.time()
  11. b=[i for i in range(100000) if i %2 ==0 ]
  12.  
  13. end = time.time()
  14. print(end-start)
  15.  
Success #stdin #stdout 0.05s 15520KB
stdin
Standard input is empty
stdout
0.011357307434082031
0.006924629211425781