find time of run for python code
import time
start_time = time.time()
main()
print("--- %s seconds ---" % (time.time() - start_time))
find time of run for python code
import time
start_time = time.time()
main()
print("--- %s seconds ---" % (time.time() - start_time))
how to check if how much time is your code taking to run in python
def program_time_checker():
start_time = time.time()
print("Grepper")
num = 90
print(num)
end_time = time.time()
return end_time-start_time
#call the function to get the time taken by your program to run
print(program_time_checker())
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us