def inputbook():
question1 = input("Do you want to input book?yes/no:")
if question1 == "yes":
author = input("Please input author:")
bookname = input("Please input book name:")
isbn = input("Please input ISBN code")
f = open("books.txt", "a")
f.write("\n")
f.write(author )
f.write(bookname )
f.write(isbn )
f.close()
elif question1 == "no":
input("Press <enter>")
inputbook();
所以我有这样的代码,当我写最后一个字符串(isbn)时,我想让python读取books.txt文件。我该怎么做?