Skip to content

Instantly share code, notes, and snippets.

@Abhayparashar31
Last active April 26, 2021 08:35
Show Gist options
  • Save Abhayparashar31/b0c63fd82c3425faed7d30f49be23d74 to your computer and use it in GitHub Desktop.
Save Abhayparashar31/b0c63fd82c3425faed7d30f49be23d74 to your computer and use it in GitHub Desktop.
'''
Execution Time Of A CodeBlock May Differ At Each Exection, because of timeit.
timeit runs your CodeBlock millions of times (default value is 1000000) so that you get the statistically most relevant
measurement of code execution time!
'''
import timeit
start = timeit.default_timer()
## Paste Your Code Here
stop = timeit.default_timer()
execution_time = stop - start
print("Program Executed in "+str(execution_time))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment