title: Is there a way to slice a string in which you know the start index while only knowing which value you want to end at in Python?
body: <p>I'm writing some code that returns the number of views the top Youtube video has based on the search query. Using requests, I'm able to figure out that the views amount is listed in index 101, the problem is that not all video views are listed with the same length. For example, &quot;6.8M views&quot; has a length of 10 while &quot;5B views&quot; has just 8. Knowing that the first digit is at index 101, and the string ends in the word &quot;views&quot;, is there a way to return the number of views? Something like:</p>
  <pre><code>numOfViews = list[101:ends with &quot;views&quot;]
  </code></pre>