how to make a leaderboard in python

Solutions on MaxInterview for how to make a leaderboard in python by the best coders in the world

showing results for - "how to make a leaderboard in python"
Titouan
18 Sep 2020
1# leaderboard = []
2f = open('Leaderboard.txt', 'r')
3leaderboard = [line.replace('\n','') for line in f.readlines()]
4
5
6for i in leaderboard:
7    print(i)
Lana
11 Jun 2019
1myList = {"person1": 1, "person2": 1, "person3": 1}
2myList["person2"] += 30
3print(myList)
4# {'person1': 1, 'person2': 31, 'person3': 1}
5