Re: [Tutor] inserting new lines in long strings while printing

2012-03-07 Thread Albert-Jan Roskam
From: Abhishek Pratap To: Steven D'Aprano Cc: tutor@python.org Sent: Wednesday, March 7, 2012 2:56 AM Subject: Re: [Tutor] inserting new lines in long strings while printing thanks guys .. > > > > >-Abhi > > >On Tue, Mar 6, 201

Re: [Tutor] inserting new lines in long strings while printing

2012-03-07 Thread Peter Otten
Abhishek Pratap wrote: > 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. There is al

Re: [Tutor] inserting new lines in long strings while printing

2012-03-06 Thread Abhishek Pratap
thanks guys .. -Abhi On Tue, Mar 6, 2012 at 5:41 PM, Steven D'Aprano wrote: > On Tue, Mar 06, 2012 at 05:26:26PM -0800, Abhishek Pratap wrote: > > 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 >

Re: [Tutor] inserting new lines in long strings while printing

2012-03-06 Thread Steven D'Aprano
On Tue, Mar 06, 2012 at 05:26:26PM -0800, Abhishek Pratap wrote: > 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 it

Re: [Tutor] inserting new lines in long strings while printing

2012-03-06 Thread Mark Lawrence
On 07/03/2012 01:26, Abhishek Pratap wrote: 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

[Tutor] inserting new lines in long strings while printing

2012-03-06 Thread Abhishek Pratap
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