import time st=time.time() a=0 for i in range (10000): a=a+i ed=time.time() print 'calculation time:',(ed-st)/60.,'mins.'