On Thu, Feb 26, 2009 at 8:43 AM, prasad rao <prasadarao...@gmail.com> wrote: > hello > Thank you Lie and Kent. > I forgot about newline character and the fact that string can be sliced. > Thanks for your timely help > BTW I have gone through the Python library reference and find no examples > in fileinput module. > z=fileinput.input(file,inplace=1) > for line in z: > ???if len(line)<60:pass
No need for the above line, it does nothing. Kent > ???if len(line)>60: > ??????line=line[:60]+'\n'+line[60:] > Is it the right way to do? > Thank you > Prasad _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor