title: Stopping summation loop as soon as digits after decimal points stop changing
body: <p>I have a loop that calculates a approximation. The loop should stop as soon as 10 digits after the decimalpoint stop changing. But I just can't get it to stop.
  <img src="https://i.stack.imgur.com/YzgSf.png" alt="Here is the math function and the error I get" /></p>
  <p>This is what I tried:</p>
  <pre><code>summe = 0
  i = 0
  l = []
  
  while True:
      i = i + 1
      summe = summe + 1/(i**3)
      l.append(format(summe, '.20f'))
      
      if l[i][:14] == l[i+1][:14]:
          break
  </code></pre>
  <p>Here is a example of what the first elements of the list looks like:</p>
  <pre><code>['1.00000000000000000000',
   '1.12500000000000000000',
   '1.16203703703703697947',
   '1.17766203703703697947',
   '1.18566203703703698658',
   '1.19029166666666652574']
  </code></pre>
  <p>So it should continue until the first 10 digits after the decimal point stop changing. Also tried it with <code>i-1</code> instead of <code>i+1</code> in the if statement. So shouldn't it compare the element and the element before with each other? Like <code>l[3] == l[2]</code>.</p>
  <p>Edit: I just saw it should be [:12] instead of [:14]. But same problem is still there</p>