Hi all. I'm making a program about 'reading and writing text files'
The assignment I have to do is suppose to look like this: http://i39.tinypic.com/5554wi.jpg
But I can't figure it how to make it so when it keeps looping until the user types in 'break' and it will list the names entered.
help, or brief explaination please? thank you!
blank=""
while not blank:
blank=("Enter your name or break to exit:")
y = open("pa16names.txt", "w")
x = raw_input("Enter your name or break to exit:")
y.writelines(x)
y. close()
y = open ("pa16names.txt", "r")
print "The names you've entered into the text file are:", y.read()
y.close()