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

Solution: Import the 'mkdir' module

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

 

For more information:
os mkdir