in python I have
title0="Blabla0"
title1="Blabla1"
title2="Blala2"
title3="Blabla3"
etc.
to write them all into a txt.file I'm specifying the path and name of file at the beginning with:
fileWrite=open('/.../final.txt','w')
and I'm calling the function
def FileWrt(typo):
fileWrite.write(typo)
after each 'title', to push the information into the file. So, my question is: Is there a way not to call FileWrt function after every 'title' or can I get rid of repeating FileWrt(title1) etc., after every title?
if I write:
FileWrt(descr,title0,title1,title2, etc.)
at the end, can I make my FileWrt() function accept as much parameters, as sent, without specifying them every time? Otherwise it will say me that that function takes 1 argument, but n is given.
Thanks