while True:
n = int(input())
l = [i for i in range(1, n) if i%7 != 0 ]
for i in l:
print(i, end=" ")
print()
不好意思我是新手
while True:
n = int(input())
l = [i for i in range(1, n) if i%7 != 0 ]
for i in l:
print(i, end=" ")
print()
不好意思我是新手
輸入說明若 n = 0 表示資料結束