If you just want to measure the elapsed wall-clock time between two points, you could use time.time():
import time
start = time.time()
print("hello")
end = time.time()
print(end - start)
The following code gives the execution time in seconds.
Hope this helps!!
If you need to learn more about Python, It's recommended to join Python Training today.
Thanks!