python输出列表中相等间距的不相同元素
python输出列表中相等间距的不相同元素
题目:a_list=[1,2,3,4,5,6,7,8,9,10],从3开始取,间隔数为7,取5个数,输出该5个数。
First=3
step=7
a_list=[]
now=First
i=0
while i<5:
a_list.append(now)
j=0
while j<step:
now+=1
if now>10:
now=1
if now
原创
2020-12-24 20:19:28 ·
1021 阅读 ·
4 评论