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).
Executive Editor David Carnoy has been a leading member of CNET's Reviews team since 2000. He covers the gamut of gadgets and is a notable reviewer of mobile accessories and portable audio products, ...