This repository has been archived on 2025-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-09-20 14:17:13 +03:00

14 lines
328 B
Python

def sortFileContents(txt):
with open(txt, 'r') as f:
lst = f.readlines()
for i in range(len(lst)):
lst[i] = int(lst[i])
lst.sort()
with open(r'sortedScores.txt', 'w') as f2:
for j in range(len(lst)):
f2.write(str(lst[j])+'\n')
print(lst)
sortFileContents(r'Scores.txt')