This is arguably the easiest way to check if both a file exists and if it is a file. import os os.path.isfile('./file.txt') # ...
確定! 回上一頁