python not giving right spacings