1Use the Python Numerize Library
2
3For example
4
5from numerize import numerize
6
7n = numerize.numerize(100) # 100
8n = numerize.numerize(1000) # 1k
9n= numerize.numerize(1500) # 1.5k
10n = numerize.numerize(1000000) # 1M
11n = numerize.numerize(1123456) # so on or and so forth