Not looking for a work around. Looking to understand why Python sorts this way.
>>> a = ['aaa','Bbb']
>>> a.sort()
>>> print(a)
['Bbb', 'aaa']
>>> a = ['aaa','bbb']
>>> a.sort()
>>> print(a)
['aaa', 'bbb']
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…