>>> x = [4,5,81,5,28958,28]
>>> print sorted(x)
[4, 5, 5, 28, 81, 28958]
>>> x
[4, 5, 81, 5, 28958, 28]
>>> x.sort()
>>> x
[4, 5, 5, 28, 81, 28958]
>>> x.append(1)
>>> x
[4, 5, 5, 28, 81, 28958, 1]
>>> sorted(x)
[1, 4, 5, 5, 28, 81, 28958]
, , :
>>> int(''.join(sorted(str(2314))))
1234
.
? .
>>> y = int(''.join(sorted(str(2314))))
>>> y
1234
>>> int(str(y)[::-1])
4321
[::-1] , .