I'm am trying to to write user input to a .txt file. The code i currently have looks like this:
with open('Emp schedule.txt','w') as schedule:
schedule.write(get_name + "\n" + str(get_pay_rate) + "\n" + str(get_the_hours))
This code just over-writes the previous data every time it is ran. How can i write data to this file without over-writing anything and also do it in a orderly manner with some sort of parameters that i set? Also, any good articles or webpages with information on writing text to a file is appreciated. I've read the python docs already.