Uzytkownik "Shi Mu" <[EMAIL PROTECTED]> napisal w wiadomosci
news:[EMAIL PROTECTED]
On 11/20/05, przemek drochomirecki <[EMAIL PROTECTED]> wrote:
>
> Uzytkownik "Peter Otten" <[EMAIL PROTECTED]> napisal w wiadomosci
> news:[EMAIL PROTECTED
Uzytkownik "Christoph Zwerschke" <[EMAIL PROTECTED]> napisal w wiadomosci
news:[EMAIL PROTECTED]
> This is probably a FAQ, but I dare to ask it nevertheless since I
> haven't found a satisfying answer yet: Why isn't there an "ordered
> dictionary" class at least in the standard list? Time and agai
Uzytkownik "Peter Otten" <[EMAIL PROTECTED]> napisal w wiadomosci
news:[EMAIL PROTECTED]
> 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 d
Uzytkownik "Shi Mu" <[EMAIL PROTECTED]> napisal w wiadomosci
news:[EMAIL PROTECTED]
I have have the following code:
>>> a=[3,5,8,0]
>>> b={}
>>>
How I can i assign each item in a as the key in the dictionary b
simultaneously?
that is,
b={3:[],5:[],8:[],0:[]}
Thanks!
Other solution:
b.fromkeys(a,
> I've a list with duplicate members and I need to make each entry
> unique.
>
> I've come up with two ways of doing it and I'd like some input on what
> would be considered more pythonic (or at least best practice).
>
> Method 1 (the traditional approach)
>
> for x in mylist:
> if mylist.count