Mar-31-2020, 07:16 AM
I don't understand the question. You can use
Also, no, you don't need to close the file - using
os.mkdir
to create directories. There's also os.makedirs
if you want to give a path and create all intermediate directories to the leaf (i.e. like mkdir -p
on the command line would do).Also, no, you don't need to close the file - using
with
takes care of that for you (go and read about context managers if you're interested).