728x90
반응형

 

 

import os.path               

file = 'test.txt'

if os.path.isfile(file):
    print("Yes. it is a file")
esif os.path.isdir(file):
	print("Yes. it is a directory")
esif os.path.exists(file):
    print("Something exist")
else :
    print("Nothing")

 

 

 

참고자료 : https://wikidocs.net/14304

불러오는 중입니다...

 

728x90
반응형