python crea diry cuando no se exsita

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