On 4 February 2016 at 03:21, Ben Finney <ben+pyt...@benfinney.id.au> wrote: > Alex Kleider <aklei...@sonic.net> writes: > >> How does a dict fit into this scheme? >> Is it a sequence? > > No, a dict is not a sequence. But it is a container: all its items > remain available and can be retrieved again and again, and you can > interrogate whether a value is one of the items in that container. > > An instance of the built-in ‘set’ type is also a container and not a > sequence. > > Containers are iterable too.
You can see an explanation of the different collection terminology here: https://docs.python.org/2/library/collections.html#collections-abstract-base-classes A dict is a Mapping and a set is a Set. Both also comes under the categories Sized, Iterable, and Container. -- Oscar _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor