码迷,mamicode.com
首页 > 其他好文 > 详细

range和arange

时间:2019-05-22 20:54:13      阅读:90      评论:0      收藏:0      [点我收藏+]

标签:ima   pre   png   image   mamicode   lis   info   inf   http   

a = np.arange(12)
print(a, type(a))

b = range(10)
print(b, type(b))
li = list(b)
print(li)

技术图片

 

拓展:

两个参数:起点,终点

三个参数:第三个是步长

技术图片

 

range和arange

标签:ima   pre   png   image   mamicode   lis   info   inf   http   

原文地址:https://www.cnblogs.com/Stephen-Qin/p/10908270.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!