about dictionary

przemek drochomirecki drochom at WYTNIJ.hyene.com
Sun Nov 20 14:28:15 CET 2005


Uzytkownik "Shi Mu" <samrobertsmith at gmail.com> napisal w wiadomosci
news:mailman.895.1132492751.18701.python-list at python.org...
On 11/20/05, przemek drochomirecki <drochom at wytnij.hyene.com> wrote:
>
> Uzytkownik "Peter Otten" <__peter__ at web.de> napisal w wiadomosci
> news:dlppk4$f0v$00$1 at news.t-online.com...
> > Shi Mu wrote:
> >
> > > how to do with it?
> >
> > Use Ben Finney's, not Przemek's approach if the values are mutables that
> you
> > plan to modify. If that's what you are asking.
> >
> > Peter
>
> Maybe he just want to use dictionary as a set.
> He can use SET container instead.
>
> Przemek
How to use SET?


http://docs.python.org/lib/types-set.html

>>> a
[3, 5, 8, 8]
>>> b = set(a)
>>> b
set([8, 3, 5])
>>>

cheers,
przemek





More information about the Python-list mailing list