How to Solve NameError: name 'rmdir' is not defined -- os
Solution: Import the 'rmdir' module
# Add the following line to the top of your code
from os import rmdir
For more information:
os rmdir
# Add the following line to the top of your code
from os import rmdir
For more information:
os rmdir