尝试写作和阅读。 文本写在文件中,但在阅读时我得到"无效的语法"在打印线上: 谢谢
text_file = open ("write_to_file.txt", "w")
t = input( "enter name ")
a = input ("address ")
enter code here`n =input ("number ")
text_file.write(t)
text_file.write(a)
text_file.write(n)
text_file.close()
text_file = open("write_to_file.txt", "r")
print text_file.read()
text_file.close()