当前位置:网站首页>range函数作用
range函数作用
2022-08-05 05:13:00 【长路漫漫 大佬为伴】
参考:range函数作用
range(n)是产生0~n-1的数,range(5)=range(0, 5)
range函数产生的不是一个列表,所以需要依次输出或者使用list函数输出整个列表
>>>range(5)
range(0, 5)
>>> for i in range(5):
... print(i)
...
0
1
2
3
4
>>> list(range(5))
[0, 1, 2, 3, 4]
>>> list(range(0))
[]
边栏推荐
猜你喜欢

Flex layout frog game clearance strategy

Qt制作18帧丘比特表白意中人、是你的丘比特嘛!!!

u-boot调试定位手段

开发一套高容错分布式系统

【学习笔记之菜Dog学C】动态内存管理之经典笔试题

基于Web的商城后台管理系统的设计与实现

OFDM Lecture 16 5 -Discrete Convolution, ISI and ICI on DMT/OFDM Systems
![LeetCode: 1403. Minimum subsequence in non-increasing order [greedy]](/img/99/41629dcd84e95eb3672d0555d6ef2c.png)
LeetCode: 1403. Minimum subsequence in non-increasing order [greedy]

结构光三维重建(一)条纹结构光三维重建

ESP32 485光照度
随机推荐
Requests the library deployment and common function
Community Sharing|Tencent Overseas Games builds game security operation capabilities based on JumpServer
MySQL中控制导出文件后变为了\N有什么解决方案吗?
Using QR codes to solve fixed asset management challenges
[cesium] 3D Tileset model is loaded and associated with the model tree
MySQL Foundation (1) - Basic Cognition and Operation
Detailed Explanation of Redis Sentinel Mode Configuration File
RL reinforcement learning summary (1)
开发一套高容错分布式系统
Returned object not currently part of this pool
位运算符与逻辑运算符的区别
雷克萨斯lm的安全性到底体现在哪里?一起来看看吧
[Decoding tools] Some online tools for Bitcoin
How can Flutter parent and child components receive click events
How to deal with DNS hijacking?
延迟加载js方式async与defer区别
RDD和DataFrame和Dataset
2022牛客多校第四场C.Easy Counting Problem(EGF+NTT)
[cesium] element highlighting
Flutter learning 2-dart learning