AJAX_Python-Mines
Friday, February 26, 2010
Saturday, January 30, 2010
A set type is a collection data type that supports the membership operator (in), the size function (len()), and is iterable. In addition, set types at least provide a set.isdisjoint() method, and support for comparisons, as well as support for the bitwise operators (which in the context of sets are used for union, intersection, etc.).
Python provides two built-in set types: the mutable set type and the immutable frozenset.
When iterated, set types provide their items in an arbitrary order.
Friday, December 18, 2009
Wednesday, November 25, 2009
A sequence type is one that supports the membership operator (in), the size function (len()), slices ([]), and is iterable.
Python provides five built-in sequence types: bytearray, bytes, list, str, and tuple.
Some other sequence types are provided in the standard library, most notably, collections.namedtuple.