How to Solve NameError: name 'Set' is not defined -- ast

Solution: Import the 'Set' module

# Add the following line to the top of your code
from ast import Set

 

For more information:
ast Set