how to format 1000 to 1k in python code example
Example: how to format 1000 to 1k in python
Use the Python Numerize Library
For example
from numerize import numerize
n = numerize.numerize(100) # 100
n = numerize.numerize(1000) # 1k
n= numerize.numerize(1500) # 1.5k
n = numerize.numerize(1000000) # 1M
n = numerize.numerize(1123456) # so on or and so forth