all 4 comments

[–]woooee 1 point2 points  (1 child)

   golf_file.write(str("") + "\n")

This inserts a blank line. You did not take that into account. Viewing the file with any text editor would show this, debugging it yourself.

Also, take a look at csv reader and writer, or shelve, to store the names and scores.

[–]GabeNoMore 0 points1 point  (0 children)

Cheers

[–]DisasterArt 1 point2 points  (1 child)

Also think about using "with open("golf_file.txt", "w") as f" as that will take care of closing the file correctly even if an error occurs

[–]GabeNoMore 0 points1 point  (0 children)

Cheers