with open("data.txt","ab+") as myfile: while(True): VName = input("Enter student name: ") if VName == \'quit\':