The equivalence of the lists with string elements doing Lexicographical comparison

Are the lists with string elements doing Lexicographical comparison below:

v = ['AB', 'C'] > ['A', 'C']

print(v)
# True

Equivalent to the below?:

v = ['A', 'B', 'C'] > ['A', '', 'C']

print(v)
# True

Yes. Comparison is described here: 6. Expressions — Python 3.14.0 documentation

Caveat: Lexicographically by Unicode code point, so if you were hoping for the collation sequence of a particular natural language I think you’re out of luck. (But there is surely a package for that.).

  1. Here is info on natsorted() from 2025. It’s for natural sorting. Python natsorted() Function - GeeksforGeeks
  2. natsort for up to Python 3.11. natsort · PyPI

Each string is compare from the list element by element.
no it does not turn [‘AB’] into [‘A’, ‘B’]
(Sorry for the smart quotes messing up things)