Is An Element of a Sequence an Object?
Steven D'Aprano
steve at pearwood.info
Sun Jun 4 00:33:22 EDT 2017
On Sat, 03 Jun 2017 21:06:19 -0700, Jon Forrest wrote:
> I wasn't thinking so much about the objects produced by an operation on
> a sequence as I was about when the sequence is created. A trivial
> sequence is
>
> "abc"
>
> As I understand it, this is one object, not three. The original excerpt
> implies the later.
Actually it implies *four* objects, not three. A better example would be
a tuple:
("a", "b", "c")
which consists of the three items (each a single character string) plus
the tuple object itself, the container holding them.
--
Steve
More information about the Python-list
mailing list