Boltzmann Partition Function Python Format Print