How can I safely create a nested directory?

PHOTO EMBED

Mon Feb 07 2022 03:05:38 GMT+0000 (Coordinated Universal Time)

Saved by @lahiruaruna

from pathlib import Path
Path("/my/directory").mkdir(parents=True, exist_ok=True)
content_copyCOPY

https://stackoverflow.com/questions/273192/how-can-i-safely-create-a-nested-directory