[Python-ideas] startsin ?
Tarek Ziadé
ziade.tarek at gmail.com
Fri Sep 30 17:47:56 CEST 2011
On Fri, Sep 30, 2011 at 5:46 PM, David Stanek <dstanek at dstanek.com> wrote:
...
> I tend to do something like this a lot;
> any(somestring.startswith(x) for x in starts)
> Probably enough that having a method would be nice.
Yeah we can have all kind of compressed loops, but I feel like a
method would be cool :)
Cheers
Tarek
--
Tarek Ziadé | http://ziade.org
More information about the Python-ideas
mailing list