On Jul 30, 5:48 pm, beginner <[EMAIL PROTECTED]> wrote:
> Hi,
>
> If I have a number n and want to generate a list based on like the
> following:
>
> def f(n):
>      l=[]
>      while n>0:
>          l.append(n%26)
>          n /=26
>     return l
>
> I am wondering what is the 'functional' way to do the same.
>
> Thanks,
> beginner

I see. It is interesting (and not surprisingly) that recursion or
yield are required. Thanks for everyone's help.

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

Reply via email to