[Tutor] Iterating through a list of strings

Andre Engels andreengels at gmail.com
Mon May 3 10:28:02 CEST 2010


On Mon, May 3, 2010 at 10:19 AM, Luke Paireepinart
<rabidpoobear at gmail.com> wrote:

> Hmm, why not
> lines = [line for line in lines if not line.strip().startswith('%')]

I knew I missed something....


-- 
André Engels, andreengels at gmail.com


More information about the Tutor mailing list