>>> import os >>> os.path.isdir('new_folder') True >>> os.path.exists(os.path.join(os.getcwd(), 'new_folder', 'file.txt')) False