python3 range

drivesim2@drivesim2:~/Desktop$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> type(range(100))
<class 'range'>
>>>
drivesim2@drivesim2:~/Desktop$ python
Python 2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> type(range(100))
<type 'list'>
>>>

猜你喜欢

转载自blog.csdn.net/wangpeng2011314/article/details/79470085