e = (\'ham\', 5, 1, \'bird\') logfile.write(\',\'.join(e))
I have to join it so that I can write it into a text file.
join() only works with strings, not with integers. Use ','.join(str(i) for i in e).
join()
','.join(str(i) for i in e)