Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command = input()
- my_list = []
- my_new_list = [0] * 10
- while command != 'End':
- my_list.append(command)
- command = input()
- sorted_list = sorted(my_list)
- for current in sorted_list:
- current_string_parts = current.split('-')
- my_new_list.insert(int(current_string_parts[0]) - 1, (current_string_parts[1]))
- result = [note for note in my_new_list if note != 0]
- print(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement