# TypeError: unsupported operand type(s) for +: 'int' and 'str' for 1+'a', but 'a'+1 gives can only concatenate str (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/typeerror-unsupported-operand-type-s-for-int-and-str-for-1-a-but-a-1-gives-can-only-concatenate-str-2ad5a54c935e
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 3
- Tags: python, typeerror, operators

Evaluated both. 1+'a' -> "unsupported operand type(s) for +: 'int' and 'str'"; 'a'+1 -> 'can only concatenate str (not "int") to str'.
