STEP 7: Now that we've imported the CSV module, we can start looking through it for real!

csv.reader(my_file) stores a CSV file inside a list-like object through which we can iterate, or loop.

  • In SUBJECT and , drag Create Reader inside get_high_scores().
  • Then, drag Print CSV File underneath inside get_high_scores().
  • Click Run and play until you lose. Then, click Console to see the file printed to the console!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)