To create a new directory Python has a function
mkdir( ) built into
name is the directory to be created in the current working location.
>>> import os >>> os.mkdir('abc') #create a directory abc in current directory >>> os.mkdir('C:/abc') #create a direcotry abc in C:
Note: Use the forward slash
/ while creating directories in another location.