Use pathlib.Path.exists(path) to check for files and directories ... Notice that path_exists will be True whether this is a file or a directory ...
確定! 回上一頁