# leaderboard = [] f = open('Leaderboard.txt', 'r') leaderboard = [line.replace(' ','') for line in f.readlines()] for i in leaderboard: print(i)