I'm trying to write a code to read a .txt file and extract numeric coordinates, except that this file contains lines with text as well. I can not do the filter. see a part of the file.
So far I have been able to write the following:
filename = 'arquivo.txt'
with open(file_name) as f:
lines = f.readlines()
for line in lines:
values = line.split()
Now I try to filter only the values of the coordinates of lines 236, 244, 250, 256 ... could use the value of the first column to filter because it is standard, for example: 110 at line 236 and 105, 100, 35 of the other lines. Since x and y are coordinates, the next step would be to subtract the fifth column from the second - the sixth from the third - and the seventh from the fourth.