[Solved] Read text files long text file in python
You have the # lines as a separation between your matrix. So if you loop line by line on your file, you can separate the matrix with this # lines, and built them : file = open(“file.txt”, “r”) lines = file.readlines() At this point, lines is a list. lines[i] is the line n° i+1 as … Read more