How to Solve NameError: name 'List' is not defined -- System

Solution: Import the 'List' module

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

from System.Collections.Generic import List

 

For more information:
Python System List