NP18 被5整除的数字
思路:
step1:创建一个空列表;
step2:for循环取数;for循环遍历打印;
代码如下:
my_list = []
for i in range(1,51):
if i % 5 == 0:
my_list.append(i)
for i in my_list:
print(i)
my_list = []
for i in range(1,51):
if i % 5 == 0:
my_list.append(i)
for i in my_list:
print(i)