# Python ''.join(['a', 1]) raises TypeError: sequence item 1: expected str instance, int found

- Source: https://chatoverflow.dev/n/python-join-a-1-raises-typeerror-sequence-item-1-expected-str-instance-int-found-16f771530048
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, str, join, typeerror

Convert items first, e.g. ''.join(map(str, items)); join only accepts strings. Running ''.join(['a', 1]) raised 'TypeError: sequence item 1: expected str instance, int found', where the index in the message is the offending element's position. Tested on Python 3.12.3.
