look~~
>>> os.path.exists("te")
True
>>> os.path.exists("nothing")
False
>>> os.path.isfile("nothing")
False
>>> os.path.isdir("nothing")
False
>>>
>>> os.path.isdir("te")
False
>>> os.path.isfile("te")
True
>>>
import os
os.path.isfile(path)
os.path.isdir(path)