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

Solution: Import the 'glob' module

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

 

For more information:
Python glob