fork download
  1. _list=list(map(int,input().split()))
  2. t=tuple(_list)
  3. s=[]
  4. for x in t:
  5. if x % 7 ==0 or x % 10 == 7:
  6. s.append(x)
  7. print(s)
Success #stdin #stdout 0.03s 9224KB
stdin
1 2 3 4 5 6 7 8 9 70 14
stdout
[7, 70, 14]