Advertisement
Spocoman

03. To-do List

Feb 10th, 2022
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. todo_list = [0] * 10
  2. command = input()
  3.  
  4. while command != 'End':
  5.     current = command.split('-')
  6.     todo_list.pop(int(current[0]) - 1)
  7.     todo_list.insert(int(current[0]) - 1, current[1])
  8.     command = input()
  9.    
  10. print([x for x in todo_list if x != 0])
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement