Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def ex():
- li = []
- while True:
- x = input()
- if x == "0":
- break
- else:
- name, age, height = x.split(",")
- age = int(age)
- height = int(height)
- li.append((name, age, height))
- li.sort(key = lambda x : (x[0], -x[1], x[2]))
- for i in li:
- print(i[0], i[1], i[2])
- ex()
Add Comment
Please, Sign In to add comment