Open an instance of the TXT file under python win

  • 2020-08-22 22:12:55
  • OfStack

As shown below:


fr=open("E:\Python\Test\datingTestSet.txt")
arrayOLines = fr.readlines()

open: Open the file

readlines: Read the file


Related articles: