``````

In [1]:

l = [10, 1, 5]

``````
``````

In [2]:

l.sort()
print(l)

``````
``````

[1, 5, 10]

``````
``````

In [3]:

l = [10, 1, 5]

``````
``````

In [4]:

print(sorted(l))

``````
``````

[1, 5, 10]

``````
``````

In [5]:

print(l)

``````
``````

[10, 1, 5]

``````
``````

In [6]:

print(sorted(l, reverse=True))

``````
``````

[10, 5, 1]

``````
``````

In [7]:

l = ['10', '01', '05']

``````
``````

In [8]:

print(sorted(l))

``````
``````

['01', '05', '10']

``````
``````

In [9]:

l = ['10', '1', '5']

``````
``````

In [10]:

print(sorted(l))

``````
``````

['1', '10', '5']

``````
``````

In [11]:

l = ['10', '1', '5']

``````
``````

In [12]:

print(sorted(l, key=int))

``````
``````

['1', '5', '10']

``````
``````

In [13]:

print(sorted(l, key=float))

``````
``````

['1', '5', '10']

``````
``````

In [14]:

l = ['10.0', '1.0', '5.0']

``````
``````

In [15]:

print(sorted(l, key=float))

``````
``````

['1.0', '5.0', '10.0']

``````
``````

In [16]:

l = ['10', '1', '5']

l.sort(key=int)
print(l)

``````
``````

['1', '5', '10']

``````
``````

In [17]:

l = ['10', '1', '5']

``````
``````

In [18]:

print([int(s) for s in l])

``````
``````

[10, 1, 5]

``````
``````

In [19]:

print(sorted([int(s) for s in l]))

``````
``````

[1, 5, 10]

``````