Python: Write array values into file
The for loop will ask i to iterate over the values of an iterable, and you’re providing a single int instead of an iterable object You should iterate over range(0,len(highscores)): or better, iterate directly over the array