title: Print the length of string only between 0 to 9 in python
body: <p>This is my code:</p>
  
  <pre><code>s = "I love the python"
  i = 0
  while i &lt; len(s):
      print (i in range(10))
      i += 1
  </code></pre>
  
  <p>The output I want is <code>01234567890123456</code>, i.e. I want to enumerate the string in the loop between number 0 to 9.</p>
  
  <p>The above code gives me:</p>
  
  <pre><code>True
  True
  True
  True
  True
  True
  True
  True
  True
  True
  False
  False
  False
  False
  False
  False
  False 
  </code></pre>