Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- values = input()
- items = values.split(" ")
- list =[]
- list_result = []
- for i in items:
- list += [int(i)]
- counter_odd = 0
- for j in range(len(list)):
- if list[j] > 0:
- list_result.append(list[j])
- list_result.reverse()
- if list_result != []:
- for k in list_result:
- print(k, end=' ')
- else:
- print("empty")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement