Advertisement
R1bell

Y.C - 1

Mar 13th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. ids = input().split()
  2. answer = []
  3. for id in ids:
  4.     for char in id:
  5.         if char.isdigit():
  6.             break
  7.     else:
  8.         answer.append(id)
  9. if answer:
  10.     [print(i, end=' ') for i in answer[:-1]]
  11.     print(answer[-1])
  12.  
  13.  
  14. ids = input().split()
  15. correct_id = False
  16. for id in ids:
  17.     for char in id:
  18.         if char.isdigit():
  19.             break
  20.     else:
  21.         if correct_id:
  22.             print(correct_id, end=' ')
  23.         correct_id = id
  24. if p: print(correct_id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement