I've looked around for some tutorials and still can't come up with any way to sort this file due to it's really weird sorting!
The file goes as: (Where x is a number, y is a date, z is time and b is a number)
x x x x x
y y y y y
z z z z z
b b b b b
There's actually 50 entries in each row but that's an extremely simplified version of the file.
What I'm struggling to do is to sort each entry so that it's [x,y,z,b]
All I've come up with so far is to split each row into a list, but that's clearly not what I need to do and thus I'm stuck.
import csv
with open('sample.txt') as csvfile:
readCSV = csv.reader(csvfile, delimiter=' ')
for row in readCSV:
print(row)