Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ids = input().split()
- answer = []
- for id in ids:
- for char in id:
- if char.isdigit():
- break
- else:
- answer.append(id)
- if answer:
- [print(i, end=' ') for i in answer[:-1]]
- print(answer[-1])
- ids = input().split()
- correct_id = False
- for id in ids:
- for char in id:
- if char.isdigit():
- break
- else:
- if correct_id:
- print(correct_id, end=' ')
- correct_id = id
- if p: print(correct_id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement