fork download
  1. #!/usr/bin/python2
  2. def test():
  3. for x in range(1,1000):
  4. x = x * x
  5.  
  6. if __name__ == '__main__':
  7. import timeit
  8. print timeit.timeit("test()", setup="from __main__ import test", number=10000)
  9.  
  10.  
Success #stdin #stdout 1.12s 8144KB
stdin
Standard input is empty
stdout
1.10271000862