function that counts...

superpollo utente at esempio.net
Thu May 20 14:36:58 EDT 2010


Grant Edwards ha scritto:
> On 2010-05-20, superpollo <utente at esempio.net> wrote:
>> Steven D'Aprano ha scritto:
>>> On Wed, 19 May 2010 21:58:04 +0200, superpollo wrote:
>>>
>>>> ... how many positive integers less than n have digits that sum up to m:
>>>>
>>>> In [197]: def prttn(m, n):
>>> Does the name "prttn" mean anything? I'm afraid I keep reading it as a 
>>> mispelling of "print n".
>> pArtItIOn
> 
> One might be tempted to suggest the name "partition".

no kidding: i was afraid to use some reserved word...



More information about the Python-list mailing list