Skip to content

Instantly share code, notes, and snippets.

@curious-username
Created September 11, 2021 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curious-username/b40261e1c6b60af2165d8f3a6dfb3cd1 to your computer and use it in GitHub Desktop.
Save curious-username/b40261e1c6b60af2165d8f3a6dfb3cd1 to your computer and use it in GitHub Desktop.
recursively creating a folder
import os
while True:
directory = input('Enter a folder name to create\n')
if directory == '':
break
else:
print(os.listdir())
os.mkdir(directory)
print(os.listdir())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment