Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. def hotels():
  2. import operator
  3. hotels_list = [input().split(' ') for _ in range(int(input()))]
  4. hotels_dict = {h_id: h_s for h_id, h_s in hotels_list}
  5. sorted_hotels = sorted(hotels_dict.items(), key=operator.itemgetter(1))
  6. for h_id, _ in sorted_hotels:
  7. print(h_id)
  8.  
  9. hotels()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement