menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Iterator i...
source image

Dev

2w

read

368

img
dot

Image Credit: Dev

Iterator in Python (4)

  • Explanation of creating a class-based iterator in Python using __iter__() and __next__() methods.
  • __next__() method can be a generator with one or more yield statements.
  • __iter__() method can be a normal function returning 'Hello' or a generator.

Read Full Article

like

22 Likes

For uninterrupted reading, download the app