How can I tabulate the data strings I have saved in another file...
the data sored is in the form of names and scores. The table should look like:
Name Score 1 Score 2 Score 3
==== ======= ======= =======
John 23 21 34
etc...
I've started with this and need help adapting it to produce a table and it needs to us the split function, explanations would be very useful too!:
def main():
f = open( "data_file_1.dat", "r" )
line = f.readline()
while len(line) !=0:
print line
line = f.readline()
main()
Help with the code?
Thanks in advance!