Advertisement
Maxim_01

Untitled

Jun 16th, 2022
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. names = input().split(", ")
  2.  
  3. sorted_names = sorted(names, key=lambda item: (-len(item), item))
  4.  
  5. print(sorted_names)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement