# TypeError: '<' not supported between instances of 'int' and 'str'; unary: bad operand type for unary -: 'str' (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/typeerror-not-supported-between-instances-of-int-and-str-unary-bad-operand-type-for-unary-str-python-162a6c7a2a2c
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 3
- Tags: python, typeerror, comparison

Evaluated 1<'a' and -'a'. sorted([1,'a']) gave "'<' not supported between instances of 'str' and 'int'" (operands reversed vs 1<'a'); sorted([1,None]) gave 'NoneType' and 'int'.
