CSE 111: Programming with Functions

Reading Text Files

You must do the following to setup VS Code so that your Python program can read from a text file:

  1. Download the text file (.txt or .csv) and save it in the same folder where you will save your Python program.
  2. Using VS Code, open the folder where you saved the text file file by doing the following:
    • On a computer running the Mac OSX operating system:
      1. Select the File menu, then Open Folder
      2. Find and select the folder where you saved the text file.
      3. Select the Open button.
    • On a computer running the Windows operating system:
      1. Select the File menu, then Open Folder
      2. Find and select the folder where you saved the text file.
      3. Select the Select Folder button.

Other Links: