当前位置:网站首页>for循环
for循环
2022-07-23 05:42:00 【AutoGalaxy】
一. 可迭代对象是 类实例化对象
参考博客:Python中可迭代对象是什么?_LaoYuanPython的博客-CSDN博客_什么是可迭代对象
1.1.类中含有成员函数 __getitem__()就可以让对象通过 实例名[index] 访问实例中的元素
1.2. 类中含有 __iter__(),就可以让类用for遍历
但是实际上,实现了 __getitem__()方法,就可以用for遍历
边栏推荐
- [pyrodiomics] the extracted image omics characteristic value is abnormal (many 0 and 1)
- VMware uses wireless network card NAT to access the Internet under Windows
- 11. Multithreading
- ninja启动过程
- 笔记|(b站)刘二大人:pytorch深度学习实践(代码详细笔记,适合零基础)
- [untitled]
- Kubesphere ha install (II)
- 规范数据库设计
- Data warehouse 4.0 notes - data warehouse environment construction - Yan configuration
- 飞桨高层API实现图像去雨
猜你喜欢

MySQL invalid conn troubleshooting

笔记 | 百度飞浆AI达人创造营:数据获取与处理(以CV任务为主)

UE4.24版本VR项目打包后,未出现手柄控制器

NT68661-屏参升级-RK3128-开机自己升级屏参

3. DQL (data query statement)

Data warehouse 4.0 notes - user behavior data collection I

Installation and process creation of activiti app used by activiti workflow

10. I/o input / output stream

Iterative display of.H5 files, h5py data operation

11、多线程
随机推荐
Introduction to the process structure used by activiti workflow
Unable to negotiate with port 51732: no matching host key type found. Their offer:
串
Tcp/ip protocol
[untitled]
ninja介绍及使用
对.h5文件的迭代显示,h5py数据操作
MySQL index
[pyrodiomics] the extracted image omics characteristic value is abnormal (many 0 and 1)
Lecturer solicitation order | Apache dolphin scheduler meetup sharing guests, looking forward to your topic and voice!
MySQL transaction
MySQL backup
方法的定义应用
MySQL用户管理
SQL realizes the user statistics of continuous login for more than 7 days
[untitled]
LearnOpenGL - Introduction
ChaosLibrary·UE4开坑笔记
互联网通信
链表相关面试题