title: How to get currency in Indian format using python?
body: <p>I have following amounts:</p>
  <pre><code>1000
  1234
  123400
  1900000
  </code></pre>
  <p>How can i convert these to:</p>
  <pre><code>1 Thousand
  1.2 Thousand
  1.2 Lakhs
  19 Lakhs
  </code></pre>
  <p>I tried a function from this link <a href="https://stackoverflow.com/questions/40951552/convert-an-amount-to-indian-notation-in-python">Convert an amount to Indian Notation in Python</a>.</p>
  <pre><code>def format_indian(t):
    dic = {
        4:'Thousand',
        5:'Lakh',
        6:'Lakh',
        7:'Crore',
        8:'Crore',
        9:'Arab'
    }
    y = 10
    len_of_number = len(str(t))
    save = t
    z=y
    while(t!=0):
      t=int(t/y)
      z*=10
  
    zeros = len(str(z)) - 3
    if zeros&gt;3:
        if zeros%2!=0:
            string = str(save)+&quot;: &quot;+str(save/(z/100))[0:4]+&quot; &quot;+dic[zeros]
        else:   
          string = str(save)+&quot;: &quot;+str(save/(z/1000))[0:4]+&quot; &quot;+dic[zeros]
          return string
    return str(save)+&quot;: &quot;+str(save)
  </code></pre>
  <p>But this is giving me:</p>
  <pre><code>format_indian(100001)
  &gt;&gt;&gt; '100001: 100001'
  </code></pre>
  <p>How can I make that to:<code>1 lakhs</code>, the above solution only works for 10's of every category. For example: <code>10 Thousand, 10 Lakhs, 10 crore</code></p>