How to select all values from one threshold to another?
<p>I have an ordered tuple of data:</p>

<pre><code>my_data = (1,2,3,2,4,2,3,3,5,7,5,3,6,8,7)
</code></pre>

<p>How can I subset the tuple items such that all items including and after the first instance of 3 are kept until the first value == 7? For example, the result should be:</p>

<pre><code>desired_output = (3,2,4,2,3,3,5,7)
</code></pre>

<p>my_data.index(my_data.index(min_thre):my_data.index(max_thre)+1)</p>

python tuples