I am trying to write a program that will write a list of info in a text file. Here's an example of what I have so far
f.open('blah.txt','w')
x = input('put something here')
y = input('put something here')
z = input('put something here')
info = [x,y,z]
a = info[0]
b = info[1]
c = info[2]
f.write(a)
f.write(b)
f.write(c)
f.close()
However i need it to write it in a list-like format so that if I input
x = 1 y = 2 z = 3
then the file will read
1,2,3
and so that the next time I input info it will write it in a newline like
1,2,3
4,5,6
How can I fix this?