Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def scoreboard(PLAYER, SCORE):
- with open('score.csv', 'r+',) as file:
- scoreObject = csv.reader(file)
- scoresPerPlayer = []
- for row in scoreObject:
- scoresPerPlayer.append(row)
- for item in scoresPerPlayer:
- if item[0] == PLAYER:
- item.append(SCORE)
- scoreObject.writerows(scoresPerPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement