python long numbers as string
import math
def human_format(number):
units = ['', 'K', 'M', 'G', 'T', 'P']
k = 1000.0
magnitude = int(math.floor(math.log(abs(number), k)))
return f"{number/k**magnitude:.2f}{units[magnitude]}"
python long numbers as string
import math
def human_format(number):
units = ['', 'K', 'M', 'G', 'T', 'P']
k = 1000.0
magnitude = int(math.floor(math.log(abs(number), k)))
return f"{number/k**magnitude:.2f}{units[magnitude]}"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us