On Wed, Apr 9, 2008 at 4:48 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > You could use > [ sys.stdout.write(some operation on item) for item in data ] > > but I consider this bad style and I seriously doubt you will see any > difference in performance.
This really isn't a good idea. It will take just as long as the for loop, plus it builds a list with the return code for each call to sys.stdout.write() call (which is probably None). Then after building the list with > 10,000 entries of None, it throws it away. That can't be good for performance. -- Jerry _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor