Execution_time2 calculate execution time in python Here we used timeit module to calculate the execution time. We have to include all our source code inside the triple quotes to get accurate result. pip command to install it is pip install timeit