Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def modify_list(lst):
- i = 0
- while i < len(lst):
- if int(lst[i]) % 2 == 0:
- lst[i] = int(lst[i]) // 2
- i += 1
- else:
- del lst[i]
- lst = list(input().split())
- modify_list(lst)
- print(lst)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement