Skip to content

Instantly share code, notes, and snippets.

@tmf16
tmf16 / gist:3899489
Created October 16, 2012 14:10
TypeError: sequence item 0: expected string, int found
# ng
>>> arr = [1, 2, 3, 4, 5]
>>> ', '.join(arr)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: sequence item 0: expected string, int found
# ok
>>> arr = [1, 2, 3, 4, 5]
>>> ', '.join(map(str, arr))