When using pathlib, getting error: TypeError: invalid file: PosixPath('example.txt')

from pathlib import Path filename = Path(__file__).parent / "example.txt" contents = open(filename, "r").read() But I get this error on some machines:html TypeError: invalid file: PosixPath('example.
相關文章
相關標籤/搜索