fast way to filter a set?

Fortepianissimo fortepianissimo at
Wed Sep 17 18:01:37 CEST 2003

I know I can do things like

s=Set(filter(lambda x:x%2==0,s))

But this seems a bit slow since filter returns a list which then must
be converted back to a set. Any tips? Thanks!

More information about the Python-list mailing list