[Tutor] really dumb questions

kevin parks kp87@lycos.com
Tue, 12 Feb 2002 23:47:05 +0900


>Thats why Beasleys book is good - it adds the examples ;-)

I loved that book. I used to have the 1st edition, but it left it on
the subway. I can't find the new edition here in Seoul, i've checked
everywhere. Some stores have the old one, but i can't buy that again.
If i am going to fork up that kind of money for an imported book I want it
to  be up to date. Anyone in Korea and got one they want to sell??

>f.writelines(map(lambda s: s+'\n', ["Scooby", "Dooby", "Doo"]))

This didn't work for me at all. (I can't find the forward slash on
this machine so if the newline character comes out funny just substitute. In Korea they put their monetary symbol where we put
the slash key).


>Or do it more explicitly in a loop:
>
>for line in ["Scooby", "Dooby", "Doo"]:
>    line = line + '\n'
>    f.write(line)

This worked like a charm. I was trying to do it this way originally
and couldn't figure out what i was doing wrong. turned out i to an error further up the program.


-kevin--




Go Get It!
Send FREE Valentine eCards with Lycos Greetings
http://greetings.lycos.com