VB.net 2010 视频教程 VB.net 2010 视频教程 python基础视频教程
SQL Server 2008 视频教程 c#入门经典教程 Visual Basic从门到精通视频教程
当前位置:
首页 > 编程开发 > python3 >
  • python3教程之range方法在Python2和Python3中的不同(3)

本站最新发布   Python从入门到精通|Python基础教程
试听地址  
https://www.xin3721.com/eschool/python.html


Python2:

1
2
3
4
5
6
7
Python 2.7.10 (default, Aug 17 201819:45:58)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] on darwin
Type "help""copyright""credits" or "license" for more information.
>>> l = range(110)
>>> l
[123456789]
>>>

 

Python3中range()方法生成的已经不是一个列表, 而是一个range的迭代器

相关教程