how to create a leaderboard on python 3.8.1
# leaderboard = []
f = open('Leaderboard.txt', 'r')
leaderboard = [line.replace('\n','') for line in f.readlines()]
for i in leaderboard:
print(i)
4.33
9
myList = {"person1": 1, "person2": 1, "person3": 1}
myList["person2"] += 30
print(myList)
# {'person1': 1, 'person2': 31, 'person3': 1}
Thank you!
9
0
Are there any code examples left?
New code examples in category Python