How does __iter__ work?

Viewed 14378

Despite reading up on it, I still dont quite understand how __iter__ works. What would be a simple explaination?

I've seen def__iter__(self): return self. I don't see how this works or the steps on how this works.

5 Answers
Related