How to Solve NameError: name 'HTML' is not defined -- prompt_toolkit

Solution: Import the 'HTML' module

To Solve the error, add the following line to the top of your code.

from prompt_toolkit import HTML

 

For more information:
Python prompt_toolkit HTML