Page 195 -
P. 195
comprehending data
Test Drive
Replace your list iteration code from earlier with your four new (beautiful) list comprehensions. Run
your program to confirm that the results have not changed.
Your new list comprehensions
produce EXACTLY the
same output as your earlier
list iterations.
As expected, the outout matches that from earlier.
You’ve written a program that reads Coach Kelly’s data from his data files,
stores his raw data in lists, sanitizes the data to a uniform format, and then
sorts and displays the coach’s data on screen. And all in 25 lines of code.
It’s probably safe to let the coach take a look at your output now.
What will the coach think?
you are here 4 159