2008/7/10 Ian Kelly <[EMAIL PROTECTED]>:
> On Thu, Jul 10, 2008 at 3:03 PM, Ian Kelly <[EMAIL PROTECTED]> wrote:
>> On Thu, Jul 10, 2008 at 3:01 PM, Ian Kelly <[EMAIL PROTECTED]> wrote:
>>> On Thu, Jul 10, 2008 at 2:57 PM, Sgeo <[EMAIL PROTECTED]> wrote:
>>>> for i in range(1000):
>>>> print "I go on hold. I come off hold."
>>>
>>> Well sure, if you use a program to do it, then any number of
>>> repetitions is trivial (at least until you start getting into the
>>> gigabytes). We're talking about effort for a *human* to do it.
>>
>> Also, you should use xrange. It's faster.
>
> On the other hand, style dictates that you shouldn't define variables
> you're not planning on using, even loop variables. Which leads to
> this:
>
> from itertools import repeat
> for action in repeat("I go on hold. I come off hold.", 1000):
> print action
>
> -root
>
print 'I go on hold. I come off hold.\n' * 1000
It's a ruby/python polyglot!