<some_path>.mkdir(parents=True, exist_ok=True)
Pathlib
from pathlib import Path
assert Path(<some_file>).is_file()
To get the Path of the current file, or a parent:
'.').resolve()
Path('.').resolve().parent Path(
Platform
import platform
if 'macOS' in platform.platform():
print('This is Mac')