iterable in Python

iterable is Python jargon for any object whose elements can be iterated. Typically, the built-in iter() method is applied on an iterable object to obtain an iterator. This iterator can only be used to move forward through the items of the iterable object from the beginning to the end, only once.

iterable is not a keyword. However, you will see it mentioned as the input parameter name in lots of built-in functions. This is an indication to the user that the function expects an iterable object as input.

For more info, see Glossary.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.