当前位置:网站首页>The role of the range function
The role of the range function
2022-08-05 05:23:00 【A long way to go】
Reference: range function function
range(n) is a number that generates 0~n-1, range(5)=range(0, 5)p>
The range function does not produce a list, so it needs to be output sequentially or use the list function to output the entire list
>>>range(5)range(0, 5)>>> for i in range(5):... print(i)...01234>>> list(range(5))[0, 1, 2, 3, 4]>>> list(range(0))[]
边栏推荐
猜你喜欢
随机推荐
[Software Exam System Architect] Software Architecture Design ③ Domain-Specific Software Architecture (DSSA)
ESP32 485 Illuminance
2023年信息与通信工程国际会议(JCICE 2023)
【技能】长期更新
Basic properties of binary tree + oj problem analysis
MySQL基础(一)---基础认知及操作
Flutter learning - the beginning
Returned object not currently part of this pool
【解码工具】Bitcoin的一些在线工具
Using QR codes to solve fixed asset management challenges
【Untitled】
重新审视分布式系统:永远不会有完美的一致性方案……
u-boot in u-boot, dm-pre-reloc
Structured Light 3D Reconstruction (2) Line Structured Light 3D Reconstruction
Qt制作18帧丘比特表白意中人、是你的丘比特嘛!!!
延迟加载js方式async与defer区别
结构光三维重建(一)条纹结构光三维重建
server disk array
MySQL中控制导出文件后变为了\N有什么解决方案吗?
Algorithms - ones and zeros (Kotlin)