Advertisement
GeorgiLukanov87

to do list

Jun 19th, 2022
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. command = input()
  2. my_list = [0] * 10
  3. while not command == 'End':
  4.     command = command.split('-')
  5.     index = int(command[0]) - 1
  6.     to_do = command[1]
  7.     my_list[index] = to_do
  8.     command = input()
  9. print([el for el in my_list if el != 0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement