2
Good night!
I have a. txt file that stores a data structure as follows:
índice: p1[x1, y1], p2[x2, y2], p3[x3, y3], p4[x4,y4]
An example of lines in my file is:
1: p1 = [62.61, 79.47], p2 = [64.17, 75.43], p3 = [58.85, 72.5], p4 = [57.45, 76.6]
2: p1 = [64.17, 75.43], p2 = [68.63, 63.22], p3 = [63.59, 60.71], p4 = [58.85, 72.5]
Thus, I would like to know how to extract only the important data from my file and store it in variables using Python language. In this case, the data of interest are the numerical values, which correspond to the Cartesian coordinates.
Any help is welcome! :)
Are 4 points per line ? Are you the one who controls the file format ? If yes then you are complicating something that you can do very simply with a csv for example
– Isac