In [1]:
x = [4, 3, 4, 1]
x


Out[1]:
[4, 3, 4, 1]

In [2]:
sum(x)


Out[2]:
12

In [3]:
sum(x)/len(x)


Out[3]:
3.0

In [4]:
x


Out[4]:
[4, 3, 4, 1]

In [5]:
sorted(x)


Out[5]:
[1, 3, 4, 4]

In [6]:
%timeit sorted(x, reverse=True)
sorted(x, reverse=True)


The slowest run took 4.72 times longer than the fastest. This could mean that an intermediate result is being cached.
100000 loops, best of 3: 2.09 µs per loop
Out[6]:
[4, 4, 3, 1]