If your program needs to read data from a file, but the file does not exist, an error would occur when running this program. What kind of error is this?
IOError
For example, trying to open a nonexistent file triggers a type of exception called an IOError … … while an out-of-bounds index to a list triggers an IndexError. By default, when an exception occurs, Python prints it out and stops our program.