Know That Tuples and Strings Are Iterable
And finally, another similarity between tuples and strings is that tuples are iterable, which means you can loop over them. Try that out. So I can keep working with the
numbers tuple here, and I can say for each
00:51 There’s another thing where tuples and strings are similar, which is that they’re iterable, just like any collection in Python. And this concludes our little excursion about the similarities between tuples and strings.
Become a Member to join the conversation.