title: Solving an equation in Python. Calculating nth digit
body: <p>I need to write a program in python that given an integer as input calculates the digit in a continuous row of natural numbers starting by 1 and continuing to infinite(ex. 12345678910111213141516171819202122 etc...) So for example if we input 17 it calculates the 17th digit in this row, which is 3.</p>
  
  <p>I have written a program that can calculate till the 189th digit but I need to make it for very big number(till position 2**31-1)</p>
  
  <pre><code>def digit_finder():
      if pos &lt; 10: #Position is equal to digit.
          digit=pos
          return(digit)
  
      elif pos &gt;= 10 en pos &lt; 189: #Number between 10 and 99.
          number=(pos-9) 
          if pos%2==0: 
              new_number=(10+(number//2))
              digit=(new_number//10)
              return digit
          else: 
              new_number=(9+(number//2))
              digit=(new_number-((new_number//10)*10))
              return digit
  </code></pre>
  
  <p>I don't know how to continue it for bigger numbers.
  Please help !</p>