Single Variable Function Reduce Python W3schools