os.mkdir(path[, mode])
Create a directory named path with numeric mode mode. The default mode is 0777 (octal). If the directory already exists, OSError is
raised.
On some systems, mode is ignored. Where it is used, the current umask value is first masked out. If bits other than the last 9 (i.e.
the last 3 digits of the octal representation of the mode) are set,
their meaning is platform-dependent. On some platforms, they are
ignored and you should call chmod() explicitly to set them.
It is also possible to create temporary directories; see the tempfile module’s tempfile.mkdtemp() function.
Availability: Unix, Windows.
os.makedirs(path[, mode])
Recursive directory creation function. Like mkdir(), but makes all intermediate-level directories needed to contain the leaf directory.
Raises an error exception if the leaf directory already exists or
cannot be created. The default mode is 0777 (octal).
The mode parameter is passed to mkdir(); see the mkdir() description for how it is interpreted.