_list=list(map(int,input().split()))t=tuple(_list)s=[]for x in t: if x % 7 ==0 or x % 10 == 7: s.append(x)print(s)
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!