# _*_ coding: utf-8 _*_
__author__ = 'pythonwu'
__date__ = "2018/5/21 0:07"

def interval(start,stop=None,step=1):
if stop is None:
start,stop=0,start #如果没有stop值,进行指定
result = []
i = start
print(i)
while i < stop:
result.append(i)
i += step
return result


print(interval(10))
print(interval(1,10))
print(interval(1,10,2))

相关文章:

  • 2020-05-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-01
  • 2021-05-23
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
相关资源
相似解决方案