[Tutor] Hello new to python and the mailing list, need some help

K J game at gameweave.com
Sat May 29 23:30:57 EDT 2004

Hello, I am new to python and need a little help. I am trying to write to a file but wich i can the only problem that I have is that Each raw_input I want to write to a seperate line so that it will print on the screen like this:


right now it just prints to the screen like this:
here is the code that I did:
NAME = raw_input("What is your name? ")
AGE = raw_input ("What is your age? ")
SEX = raw_input ("What is your sex? ")

player = open("name.plr", 'w')
player.write (NAME)
player.write (AGE)
player.write (SEX)

player = open("name.plr", 'r')
line = player.readline()

print line

Thanks for any help 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20040529/5efe916f/attachment.html

More information about the Tutor mailing list