Python 3 Quick Tip: The easy way to deal with file paths on Windows, Mac and Linux - smart1004/doc GitHub Wiki


https://medium.com/@ageitgey/python-3-quick-tip-the-easy-way-to-deal-with-file-paths-on-windows-mac-and-linux-11a072b58d5f

from pathlib import Path

data_folder = Path("source_data/text_files/")

file_to_open = data_folder / "raw_data.txt"

f = open(file_to_open)

print(f.read())

@@@@@@@@@@@
https://wikidocs.net/3716