Python interview question #33: Iterator protocol

Publicado el: 27 abril 2025
en el canal de: Python and Pandas with Reuven Lerner
177
8

How do "for" loops work in Python? They use the "iterator protocol." What is that, and how does it work?

In this video, I walk you through the protocol, how it works, and how we can write our own objects that implement the protocol. If you're asked to make a class iterable in a Python job interview -- or if you're just asked what happens when you run a "for" loop -- you'll be prepared.

To download the Jupyter notebooks I used in this course, go to https://AcePythonInterviews.com .


En esta página del sitio puede ver el video en línea Python interview question #33: Iterator protocol de Duración hora minuto segunda en buena calidad , que subió el usuario Python and Pandas with Reuven Lerner 27 abril 2025, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 177 veces y le gustó 8 a los espectadores. Disfruta viendo!