I want to strip the scores from the file and arrange them in an ordered list where I can print out the 1st, 2nd and 3rd place, here is my code:
scores = [] result_f = open("results.txt") for line in result_f: (name, score) = line.split() scores.append = (float(score)) result_f.close() print("The highest scores were: ") print(score[0]) print(score[1]) print(score[2]) the console error python gives is:
File "C:\Python34\surfingscores.py", line 5, in scores.append = (float(score)) AttributeError: 'list' object attribute 'append' is read-only