(Learner-here) Lists + Functions = headache

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun May 5 21:48:50 EDT 2013


On Mon, 06 May 2013 01:31:48 +0000, Steven D'Aprano wrote:

> So your function always returns either 0 (if there are no
> "fizz" in the list at all) or 1 (if there is any "fizz").

Correction: (thanks to Terry for pointing this out). It will return None 
or 1, not 0.

How easy it is to fall into the trap of assuming the function will do 
what you intend it to do, instead of what you actually tell it to do :-(



-- 
Steven



More information about the Python-list mailing list