is there a python library that would make numbers such as this more human readable
$187,280,840,422,780
edited: for example iw ant the output of this to be 187 Trillion not just comma separated. So I want output to be trillions, millions, billions etc
As I understand it, you only want the ‘most significant’ part. To do so, use
floor(log10(abs(n)))to get number of digits and then go from there. Something like this, maybe:Running the above function for a bunch of different numbers: