I am reading a .txt file in python. It contains five columns of numbers. I have tried to find the number of elements using
numcols = len(linesX[0])
Unfortunately, since python reads the .txt as a list of strings
f = open('XdataTXT.txt','r')
linesX=f.readlines()
The output is 81 instead of 5. I have tried to implement the solution offered in this thread, but since they are dealing with a .csv instead of a .txt I cannot replicate the results. Can someone help me?
In the attached image you can see how my original data looks.