[Tutor] printing files
marc.tompkins at gmail.com
Thu Mar 26 18:56:10 CET 2009
On Thu, Mar 26, 2009 at 10:42 AM, Bala subramanian <
bala.biophysics at gmail.com> 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
> another variable. Is there any
> fancy way of doing it.
Without changing anything else, you could do it with a slice:
> for files in flist:
> print>>out, handle[1:] # start with second item (indexes start at 0,
> remember) and go to end
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor