how to make a leaderboard python code example
Example 1: how to make a leaderboard in python
# leaderboard = []
f = open('Leaderboard.txt', 'r')
leaderboard = [line.replace('\n','') for line in f.readlines()]
for i in leaderboard:
print(i)
Example 2: how to create a leaderboard on python 3.8.1
myList = {"person1": 1, "person2": 1, "person3": 1}
myList["person2"] += 30
print(myList)
# {'person1': 1, 'person2': 31, 'person3': 1}