A Python file I/O training exercise