Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def func(y):
- return -int(y[2]), y[0], y[1]
- a = open('input.txt', 'r', encoding='utf-8')
- data = []
- for x in a.readlines():
- x1, x2, x3, x4 = x.split()
- data.append([x1, x2, x4])
- data.sort(key=func)
- for x in data:
- print(*x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement