Tom_Jung

Untitled

Mar 13th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. scores = '54 - Alice,35 - Bob,27 - Carol,27 - Chuck,05 - Craig,30\
  2. - Dan,27 - Erin,77 - Eve,14 - Fay,20 - Frank,48 - Grace,61 - Heidi,03 \
  3. - Judy,28 - Mallory,05 - Olivia,44 - Oscar,34 - Peggy,30 - Sybil,82\
  4. - Trent,75 - Trudy,92 - Victor,37 - Walter'
  5.  
  6. list_of_scores = scores.split(",")
  7. #print(list_of_scores)
  8.  
  9. sorted_list = sorted(list_of_scores)
  10. print(sorted_list)
  11. print()
  12. print()
  13.  
  14. reverse_order = sorted_list[::-1]
  15. print(reverse_order)
Advertisement
Add Comment
Please, Sign In to add comment