Hi, Wonder if anyone here can help with this:
I'm trying to split each line of data from a text file into a list or tuple.
The lines contain a mixture of ints, floats, and strings (with spaces).
I can do it easily enough using split() twice - once by " ' " and then by space. I was hoping to use the csv module - but that only seems to work if the text is separated by one space - and in these files, there can be many spaces between the numbers.
Is there a concise way of splitting up lines like these using a regex, or some other clever method?
10471 'AGHADA71' 20.00 2 0.00 0.00 1 1 1.0106 0.312
10475 'AGHADA75' 21.00 2 0.00 0.00 1 1 0.9940 -1.217
10810 'AHANE 10' 110.00 1 0.00 0.00 1 1 1.0517 -4.091
Thanks in advance!