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

Solution: Import the 'filecmp' module

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

 

For more information:
Python filecmp