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

Solution: Import the 'six' module

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

 

For more information:
Python six