How to Solve NameError: name 'ascii_lowercase' is not defined -- string

Solution: Import the 'ascii_lowercase' module

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

from string import ascii_lowercase

 

For more information:
Python string ascii_lowercase