S Borg wrote:
> Hello,
>
> I am parsing text from one document to another. I have a scheme
> similar to:
>
> for x in myfoobar:
>print >> mytextfile, "%s" % mydictionary[x], #all on same line
> print >> mytextfile, '\n' #new line
>
>
> I am getting line breaks before my explic
ZeD wrote:
> Ciao, Juho Schultz! Che stavi dicendo?
>
Moro, ZeD! Kunhan pulisen. Should we stick to English?
>
>>should work. IMO file.write() is self-explanatory but "print >> file" is
>>a bit obscure.
>
> is obscure only if you have never used a shell :)
>
(I have used the shell a bit. I star
S Borg wrote:
> I am parsing text from one document to another. I have a scheme
> similar to:
>
> for x in myfoobar:
>print >> mytextfile, "%s" % mydictionary[x], #all on same line
print >> mytextfile # minimal fix
> I am getting line breaks before my explicit line break. Am
Ciao, Juho Schultz! Che stavi dicendo?
> should work. IMO file.write() is self-explanatory but "print >> file" is
> a bit obscure.
is obscure only if you have never used a shell :)
--
Evangelion e' la storia yaoi di un angelo che vuole portarsi a letto un
ragazzo che si intreccia con la storia
S Borg wrote:
> print >> mytextfile, '\n' #new line
Wouldn't this print two line breaks--the one you specify in the string,
plus the one always added by print if there is no comma at the end of
the statement?
--
http://mail.python.org/mailman/listinfo/python-list
S Borg wrote:
> Hello,
>
> I am parsing text from one document to another. I have a scheme
> similar to:
>
> for x in myfoobar:
>print >> mytextfile, "%s" % mydictionary[x], #all on same line
> print >> mytextfile, '\n' #new line
>
>
> I am getting line breaks before my explic
S Borg wrote:
> Hello,
>
> I am parsing text from one document to another. I have a scheme
> similar to:
>
> for x in myfoobar:
>print >> mytextfile, "%s" % mydictionary[x], #all on same line
> print >> mytextfile, '\n' #new line
>
You are using the print command to output the t