try this:
print("ask your question? ", end="") #end="" is optional and removes the new line character so that input can be on the same line as the question answer = input()
#write to file with open("your file", "a") as variable_name: #a is append mode so new lines are automatic print(answer, file=variable_name) [/python [python] #read from file and print text to screen with open("your file", "r") as variable_name: #r is read only mode for line in variable_name: print(line)