items = ['a10', 'a2', 'b1', 'a1']result = sorted(items, key=lambda x: (x[0], int(x[1:])))print(result)