Matimus wrote:

> Well, I have another at bat, so I will try to redeem myself... using
> recursion:
>
> def printTable(l,c):
>     print(("%d "*len(l[:c]))%tuple(l[:c]))
>     if( len(l[:c]) > 0 ):
>         printTable(l[c:],c)
>
> printTable(range(1,101),5)

Sorry. Recursion disqualified your batter before he got out of the
dugout. Besides the %d restricts it to use wirh integers, and using
"L".lower() as a variable name made the umpire barf through his
facemask all over the catcher. Fortunately the ump didn't notice the
weirdly-spaced and superfluous () in the if statement ...

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

Reply via email to