Iterable
say it: “IT-er-uh-bul” /ˈɪtərəbəl/
Anything you can loop over with for.
What is an iterable?
An iterable is anything you can loop over with for: lists, strings, dictionaries, files, range() and more.
for letter in "hey":
print(letter) # h, e, y
for line in open("guests.txt"):
print(line.strip())
Level: Journeyman · More Python terms at this level
Updated