Image of wooded boxes — used in article on Python sequences

What’s a Python Sequence? [Python Data Structure Series #2]

Note: This article has now moved here: Sequences in Python (Data Structure Categories #2) – Sequences are different from iterables • Part 2 of the Data Structure Categories Series

Here’s an introduction to the article:

You started your journey through Python’s main data structure categories in the first article in this series, which dealt with iterables. In this article, you’ll focus on another term you’ll often see in Python articles and documentation. You’ll explore the Python sequence.

‘Sequence’ is not the name of a single data type in Python. Instead, as you saw with iterable, and you’ll see with all terms in this series, it’s a category of data types. Lists, tuples, and strings are among the most common data types that are sequences.

It’s also common to confuse iterables and sequences, as there’s quite a bit of overlap between the two terms. But as you’ll see, they’re not the same thing!

Subscribe to

The Python Coding Stack

Regular articles for the intermediate Python programmer or a beginner who wants to “read ahead”

Next Article: What’s a Python Mapping

1 thought on “What’s a Python Sequence? [Python Data Structure Series #2]”

Leave a Reply