Question 3 Which of the following methods from the os module will create a new directory? code example
Example: create a directory python
#creates a directory without throwing an error
import os
def create_dir(dir):
if not os.path.exists(dir):
os.makedirs(dir)
print("Created Directory : ", dir)
else:
print("Directory already existed : ", dir)
return dir