How to Solve NameError: name 'timeit' is not defined

Solution: Import the 'timeit' module

# Add the following line to the top of your code
import timeit

 

For more information:
Python timeit