🌈 搜索
📅  最后修改于: 2022-03-11 14:47:09.182000             🧑  作者: Mango
import os filepath = '/a/path/to/my/file.txt' os.path.dirname(filepath) # Yields '/a/path/to/my'