I have a question about how to update a string within a function after calling it. I want it to save after I call the function. It's the equivalent of pressing "control+s" to save an excel file after you edit it. Here's example code:
def function():
x=['string'];y=input();x.append(y)
What I want have have happen is: If I call this function 3 times over a month, I'd like to have it read: x=['string',input1,input2,input3]
It currently will only store x 2 values maximum. For example: x=['string',input1]
I understand that even if there is a way to update this string/function, the fact that I have x=['string'] at the start will always change x to x=['string'] when I call it...Is there a built-in way to do this and have it update the way I want it to?