Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def hotels():
- import operator
- hotels_list = [input().split(' ') for _ in range(int(input()))]
- hotels_dict = {h_id: h_s for h_id, h_s in hotels_list}
- sorted_hotels = sorted(hotels_dict.items(), key=operator.itemgetter(1))
- for h_id, _ in sorted_hotels:
- print(h_id)
- hotels()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement