[Tutor] Re: print out lines that start with a word

Liam Clarke cyresse at gmail.com
Wed Feb 9 11:32:51 CET 2005

print [w for w in j.split() if w[0] == '*' and w[-1] == '*'] 

Wouldn't that only work if it was bug *car* jeff?

I can imagine bug*car*jeff would throw it.


Liam Clarke
'There is only one basic human right, and that is to do as you damn well please.
And with it comes the only basic human duty, to take the consequences.

More information about the Tutor mailing list