You are a guest. Restricted access. Read more

Sets

A set is an unordered collection of objects that cannot have duplicate members. They are similar to lists, except that they are unordered (like dictionaries). Sets are useful because they do not allow duplicate entries and they can be used for mathematical comparisons.


set = set([1, 2, 3, 4, 5, 6, 7, 8, 9])
print set

python/collections/sets.txt · Last modified: 2013/04/14 16:52 (external edit)
Back to top
CC Attribution-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0