本文最后更新于 2 分钟前,文中所描述的信息可能已发生改变。
Visualize Tool
- Online Python Tutor - Visualize program execution
- Python Tutor - Python Online Compiler with Visual AI Help
Package Manage Tool
Libraries
Pathlib
python
from pathlib import Path
path = Path('path/to/file') # Create a Path object
path.exists(parents=True) # Check if the file exists
path.mkdir(parents=True, exist_ok=True) # Create the directory