It would work as you want if the list items were numbers. You have a number of ways to solve it for a list of strings.
If your Python is 2.4 use the key parameter to compare each item as an integer. This is the easiest:
>>> sorted(l, key = int)
['1', '1', '2', '2', '2', '2', '2', '4', '5', '5', '7', '10', '21']
With any Python version you can use the cmp parameter to compare each two items with a user supplied comparison function:
>>> sorted(l, cmp = lambda x,y: cmp(int(x), int(y)))
['1', '1', '2', '2', '2', '2', '2', '4', '5', '5', '7', '10', '21']
Or use list comprehensions:
>>> sorted([int(x) for x in l])
[1, 1, 2, 2, 2, 2, 2, 4, 5, 5, 7, 10, 21]
>>>
>>> # if you want the items back as strings apply the str() function to each item after the sort:
...
>>> [str(x) for x in sorted([int(x) for x in l])]
['1', '1', '2', '2', '2', '2', '2', '4', '5', '5', '7', '10', '21']