Source Code:
(back to article)
import time start_time = time.time() i = 1 for i in range(1000000): i += 1 end_time = time.time() time_elapsed = end_time - start_time print("Time taken: ", time_elapsed)
Result:
Report an issue