If you've read a fair amount of Python code, then you've probably seen this "__init__.py" file pop up quite a few times. It's especially common in larger Python projects. I'm going to breakdown ...
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).