How to Solve NameError: name 'unicode_literals' is not defined -- __future__

Erorr: name 'unicode_literals' is not defined

NameError: name 'unicode_literals' is not defined

Solution: Import the 'unicode_literals' module

# Add the following line to the top of your code
from __future__ import unicode_literals

 

For more information:
__future__ unicode_literals