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. > It is an iterable (in that for key in d: works although not in a > predictable manner and for this reason I tend NOT to think of it as a > sequence.) That's right, IMO. -- \ “The generation of random numbers is too important to be left | `\ to chance.” —Robert R. Coveyou | _o__) | Ben Finney _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor