print'Personal information, journal and more to come'
while True:
x = raw_input()
if x =="personal information":
print' Edward , Height: 5,10 , EYES: brown , STATE: IL TOWN: , SS:'
elif x =="journal":
print'would you like you open a journal or create a new one? open or create'
if x =='createfile':
name_of_file = raw_input("What is the name of the file: ")
completeName = "C:\\python\\" + name_of_file + ".txt"
file1 = open(completeName , "w")
toFile = raw_input("Write what you want into the field")
file1.write(toFile)
file1.close()
elif x =='openfile':
print'what file would you like to open'
y = raw_input()
read = open(y , 'r')
name = read.readline()
print (name)
break
每次我尝试运行程序时,它都会不断告诉我中断已超出循环,但我不知道我还能在哪里设置中断。还有什么是记住在循环末尾放置中断的好方法?