1 Matching Annotations
  1. May 2020
    1. When the file is read using a for loop in this manner, Python takes care of splitting the data in the file into separate lines using the newline character. Python reads each line through the newline and includes the newline as the last character in the line variable for each iteration of the for loop.

      This is how python reads files in a for loop