Compute variance of a list in Python | PayPal Interview Question