Sorting and aligning the contents of a text file in Python
- by Emily Price
In my program I have a text file that I read from and write to. However, I would like to display the contents of the text file in an aligned and sorted manner. The contents currently read:
name, score
name, score
This is my code where the text file in read and printed:
elif userCommand == 'V':
print "High Scores:"
scoresFile =…