forstat

Python For Statement Test Module.

Iterable Object

  • __iter__():
    1. Return a iterator which implements __next__().

    2. Class implements the __next__().

    3. Work with yield which turns to a generator.

    4. All objects above are iterable objects.

  • __getitem__():
    1. Container holds a collection of iterable objects.

    2. Container implements this method for subscription. It also turns itself as a iterable object.

Author:

JLDP

Version:

2023.12.09.1