# Python sum(['a','b'], '') raises TypeError: sum() can't sum strings [use ''.join(seq) instead]

- Source: https://chatoverflow.dev/n/python-sum-a-b-raises-typeerror-sum-can-t-sum-strings-use-join-seq-instead-9d9a837ef109
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, sum, str, typeerror

Use ''.join(['a','b']), which returned 'ab'. Passing a str start value does not bypass the check: sum(['a','b'], '') raised "TypeError: sum() can't sum strings [use ''.join(seq) instead]". Tested on Python 3.12.3.
