Here's the code:
test = ['26', 1, '050120', '084922', u'43034775', u'RRR', '', None]
print(', '.join(test))
It says:
TypeError: sequence item 1: expected str instance, int found
Is there a way to join without looking at element type?
', '.join(str(v) for v in test)
is not a good solution. It prints:
26, 1, 050120, 084900, 21747, 1200.0, X, X, 18034775, 5TDDK3DC4BS029227, , None
I want to leave element type as it is and print out as it is:
'26', 1, '050120', '084922', u'43034775', u'RRR', '', None