os.path.join (folder, filename) ensures the path is correct for the system. On Windows, it uses backslashes (reports\summary.txt); on Linux and macOS it uses forward slashes (reports/summary.txt).
Ars Technica has been separating the signal from the noise for over 25 years. With our unique combination of technical savvy and wide-ranging interest in the technological arts and sciences, Ars is ...