I am coding a python database relying on txt file's. I have one function that has some parameters. Here is the base code:
def store_new_content(mainfield,filename,f1 = None,f2 = None,f3 = None,*arg):
file1 = open(f"{filename}.txt","w")
name1 = f":{f1}"
name2 = f":{f2}"
name3 = f":{f3}"
unlimitedname= f":{arg}"
file1.write(f"{name}{name1}{name2}{name3}{arg} \n")
seem's normal right? wrong. So I want the result in filename.txt to be f1:f2:f3:f4:f5:f6:f7 and so on and so on. But it comes out as f1:f2:f3(f4,f5,f6,f7).So how do I make it come our correctly, btw f4,f5,f6,f7 are from the *args. if not possible does anyone know how to have unlimited parameters that will come out neatly?