Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open('input.txt', 'r', encoding='utf8') # открывает текст
- participants = file.readlines() # считывает из файла все строки в список
- for participant in participants:
- participants = participants.split()
- participants.sort(key=lambda x: x[0])
- for n in range(len(participants)):
- print(participants[n][0], participants[n][1], participants[n][3])
- file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement