I don't think there's a built-in function that does that. You'll have to roll your own, e.g.:
def human_format(num):
magnitude = 0
while abs(num) >= 1000:
magnitude += 1
num /= 1000.0
# add more suffixes if you need them
return '%.2f%s' % (num, ['', 'K', 'M', 'G', 'T', 'P'][magnitude])
print('the answer is %s' % human_format(7436313)) # prints 'the answer is 7.44M'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…