📅  最后修改于: 2022-03-11 14:45:38.428000             🧑  作者: Mango
import os
# check the if the path is a directory
print(os.path.isdir("path"))
# check if the path is a file
print(os.path.isfile("path"))