import os

os.path.isdir(full_filename)

참고 자료

https://wikidocs.net/39