In [52]: import io In [53]: row = ('ACME', 50, 91.5) In [54]: ','.join(row) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-54-b1add756d97c> in <module> ----> 1 ','.join(row) TypeError: sequence item 1: expected str instance, int found In [55]: r = io.StringIO() In [56]: print(*row,sep=',',file=r) In [57]: r.getvalue() Out[57]: 'ACME,50,91.5\n' In [58]: row = r.getvalue() In [59]: row Out[59]: 'ACME,50,91.5\n'