On Thu, Mar 26, 2009 at 10:42 AM, Bala subramanian <
[email protected]> wrote:
> print>>out, handle <-- Here i want to write only from second line. I
> dnt want to loop over handle here and putting all lines except the first one
> in
> another variable. Is there any
> fancy way of doing it.
>
Without changing anything else, you could do it with a slice:
flist=glob.glob(*.txt)
> out=open('all','w')
>
> for files in flist:
> handle=open(flist).readlines()
> print>>out, handle[1:] # start with second item (indexes start at 0,
> remember) and go to end
> out.close()
>
--
www.fsrtechnologies.com
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor