Tim Golden wrote:
Diez B. Roggisch wrote:
Hans Larsen schrieb:
Could you help me ?
How could I "take" an elemment from a set or a frozenset .-) ?

From a string (unicode? Python<3), or from a tuple,or from a list: Element by index or slice.
                    From a dict: by key.
                    But what concerning a set or frozenset!

         hope somebody can help!

You iterate over them. If you only want one value, use


iter(the_set).next()

or the_set.pop ()

Which will, in addition, remove it from the set.
(May not be what you want :) ).

TJG
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to