News for hackers. Stuff that matters.
Re:Display 100 Hello World Without Using Loops by danielroseman on Friday May 25, 2012 @06:30AM (#4022871)
I think a better Python version would be

    print '\n'.join(['Hello world'] * 100)
No need for exec.
Re:Display 100 Hello World Without Using Loops by resurge on Friday May 25, 2012 @06:35AM (#4022882)
I wonder why 430gj9j added exec..

  print "Hello world\n"*100
Would have worked just fine.
Re:Display 100 Hello World Without Using Loops by lloeki on Friday May 25, 2012 @06:40AM (#4022904)
He abstracted this loop:

    for i in xrange(100):
        statement
into:

   exec "statement" * 100
The 'no exec' alternatives propose something not as generic since they can only print something a number of times.
Re:Display 100 Hello World Without Using Loops by masklinn on Friday May 25, 2012 @06:33AM (#4022877)
Or just

    print "Hello, World\n" * 100
No need for join either, and ends with a newline