[Tutor] inserting new lines in long strings while printing

Abhishek Pratap abhishek.vit at gmail.com
Wed Mar 7 02:26:26 CET 2012


I have this one big string in python which I want to print to a file
inserting a new line after each 100 characters. Is there a slick way to do
this without looping over the string.  I am pretty sure there shud be
something its just I am new to the lang.


Thanks!
-Abhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120306/dcf48dd9/attachment.html>


More information about the Tutor mailing list