[0, 0, 0, 1, 1, 1, 0] ... remove all 0 values
Friðrik Már Jónsson
fridrik at pyth.net
Wed Jul 8 12:44:47 EDT 2009
- Previous message (by thread): [0, 0, 0, 1, 1, 1, 0] ... remove all 0 values
- Next message (by thread): [0, 0, 0, 1, 1, 1, 0] ... remove all 0 values
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
J Kenneth King wrote:
> I was wondering when someone would mention filter()
I was happy to see that too.
It's clean, faster than list comprehension and in terms of clarity
it's only to be expected that the developer is familiar with, or at
least willing to look up, the available built-in methods.
Regards,
Friðrik Már
- Previous message (by thread): [0, 0, 0, 1, 1, 1, 0] ... remove all 0 values
- Next message (by thread): [0, 0, 0, 1, 1, 1, 0] ... remove all 0 values
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-list
mailing list