Sets in Python

Francesco Guerrieri f.guerrieri at gmail.com
Wed Sep 19 03:35:20 EDT 2007


On 9/19/07, Paddy <paddy3118 at googlemail.com> wrote:

> frozenset over turning the embedded list into a tuple?
> The tuple would preserve order in the item (1,2)
>  a = set([1,2,3, (1,2)])

The OP was probably thinking in mathematical terms as in "the set of
all the possible subsets   of the set composed by 1, 2 and 3" and thus
order would not be important.

francesco



More information about the Python-list mailing list