problems with code

Peter Hansen peter at engcorp.com
Thu May 22 09:00:04 EDT 2003


cancal wrote:
> 
> This script finds "Smith numbers" in the range passed to smith(). (Smith
> numbers are numbers the sum of whose digits equals the sum of digits in
> their prime factors.)
> 
> At runtime a type error is raised: interation over non-sequence, at the
> line 'for each in flist' in the function pf(). 

As always, post the *actual traceback*, not merely your interpretation of it.
Chances are you are stuck because you are overconfident that one part of 
your code works the way you think it does in all cases, when in fact it
does not.  Or maybe that's not the case, but nobody here will believe it
until you post the traceback and convince us. :)

-Peter




More information about the Python-list mailing list