My coding here:
option_input = raw_input(">>>")
option_input = option_input.upper()
if option_input == "V":
print "High Scores:"
saveFile = open("scores.txt", 'r')
scores = saveFile.read()
saveFile.close()
nameScore= []
for line in scores.split('\n'):
# skip any empty line
if not line:
continue
userScore, score = line.split(',')
#convert score to a numeric value
score = int(score)
nameScore.append((score, userScore))
print "%-18s %s" % (nameScore, score)
the result still show up :
High Scores:
[(13, 'Matthew'), (6, 'Luke'), (3, 'John'), (3, 'john')] 3
I want to show this up like
13, Matthew
6, Luke
3, john
all should be align..
I really looking forward your help :)