You could try: p = pathlib.Path("temp/") p.mkdir(parents=True, exist_ok=True) fn = "test.txt" # I don't know what is your fn filepath = p ...
確定! 回上一頁