dict().fromkeys(yourlist).keys()
posted by serge at 7:03 PM
Also in python 2.4list(set(my_list))or stably (from Serge)[m for i,m in enumerate(my_list) if m not in my_list[:i]]
By brian, at 1:07 PM
Also:uniquify = 30k hitsuniquefy = 251 hitsThat's weird. Neither are words, of course. I blame the word liquid.
By brian, at 1:12 PM
Post a Comment << Home
2 Comments:
Also in python 2.4
list(set(my_list))
or stably (from Serge)
[m for i,m in enumerate(my_list) if m not in my_list[:i]]
By brian, at 1:07 PM
Also:
uniquify = 30k hits
uniquefy = 251 hits
That's weird. Neither are words, of course. I blame the word liquid.
By brian, at 1:12 PM
Post a Comment
<< Home