On May 19, 9:30 pm, superpollo <ute...@esempio.net> wrote:
> René 'Necoro' Neumann ha scritto:
> > An idea would be:
>
> >>>> def prttn(m, n):
> > ...        return sum(1 for x in range(n) if sum(map(int, str(x))) == m)
>
> TypeError: 'int' object is not callable
>
> on 2.5.4

The TypeError is almost certainly because you've created a integer
'sum' variable in your script/interpreter session, hiding the built-in
sum function.

--
Mark
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to