e = (\'ham\', 5, 1, \'bird\') logfile.write(\',\'.join(e))
I have to join it so that I can write it into a text file.
You might be better off simply converting the tuple to a list first:
e = ('ham', 5, 1, 'bird') liste = list(e) ','.join(liste)