_list=list(map(int,input().split()))t=tuple(_list)res=[x for x in t if x%7==0 or x%10==7]for i in res: print(i)
1 2 3 4 5 6 7 8 9 70 14
7 70 14
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!