How to Solve NameError: name 'getcwd' is not defined -- os

Solution: Import the 'getcwd' module

# Add the following line to the top of your code
from os import getcwd

 

For more information:
os getcwd