Question

Step 3: main

In autompg.py implement a main function that instantiates an AutoMPGData object and then

uses the iterator protocol (e.g., for a in AutoMPGData():) to loop across the object, printing

each AutoMPG object. For example, the output should look like this:

> python3 autompg.py

AutoMPG ('chevrolet', 'chevelle malibu', 1970, 18.0)

AutoMPG ('buick', 'skylark 320', 1970,15.0)

AutoMPG ('plymouth', 'satellite', 1970, 18.0)

AutoMPG ('amc', 'rebel sst', 1970, 16.0)

AutoMPG ('ford', 'torino', 1970, 17.0)

Question image 1