Every operating system makes use of files as the primary storage mechanism, and as such, there are mechanisms that allow us open and read from these files. Python also provides methods for opening, reading, and writing from files, but there are significant differences regarding how Python 2 and 3 handles file processing. This chapter explains the differences and shows neutral ways of performing file processing for compatibility on both versions using the io.open method.
File Processing
Before we look at compatibility in files, I will chitchat a bit about general file processing. ...