Trying to understand python formatting