Iterable

Domain: Programming Fundamentals

🎯 Motivation

Anything you can loop over with a for loop is iterable - lists, strings, dictionaries, files, and more.

📋 Concrete Example

for x in [1,2,3] - list is iterable. for c in 'hi' - string is iterable. for k in {'a':1} - dict is iterable (iterates over keys).

🔗 Analogy

A conveyor belt of items - as long as items keep coming, you can process them one at a time. The belt is the iterable.