[Tutor] removing sq. of items.

Bala subramanian bala.biophysics at gmail.com
Wed May 23 11:51:42 CEST 2012

While iterating through each list item and printing/writing it, why does
the sq. brackets get printed/written to the file. Just a small eg.code is
given below.

>>> myl=range(1,100+1)
>>> new=[myl[i:i+15] for i in range(0, len(myl),15)]
>>> for x in new: print x

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120523/97c7e08d/attachment-0001.html>

More information about the Tutor mailing list