I think you need to convert your Data
response into a string to write it to a text file.
However, I can't really tell without seeing the error that you are getting, so if you post that I can see what is wrong.
As for best practices, you may also want to look into using the with open("Base.txt", "a") as students:
syntax, as explained in the documentation: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…