lista = [123, 32343, 556, 57754345, 3242565, 232323232323, 1]
print(sorted(lista, key=lambda x: len(str(x))))
A = [1, 2, 3]
B = A.copy()
print(id(A), id(B))

7fd8367e4a16e62fe36795fc4bd5bffeee7d89bc
<mask token>

<mask token>
print(sorted(lista, key=lambda x: len(str(x))))
<mask token>
print(id(A), id(B))

lista = [123, 32343, 556, 57754345, 3242565, 232323232323, 1]
print(sorted(lista, key=lambda x: len(str(x))))
A = [1, 2, 3]
B = A.copy()
print(id(A), id(B))
