The method os.path.exists('file.txt') returns True if the file 'file.txt' exists, and False otherwise. To use it, import the os module first with import os ...
確定! 回上一頁