Remove empty strings from list

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Tue Sep 15 05:21:30 EDT 2009


Dennis Lee Bieber a écrit :
(snip)
> 	All of which can be condensed into a simple
>> 	for ln in f:
> 		wrds = ln.strip()
> 		# do something with the words -- no whitespace to be seen

I assume you meant:
 wrds = ln.strip().split()
?-)


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /