obtain the index of elements in a list that satisfy a condition : <p>I am trying to index the positions of a list of integers to obtain the position of the intergers that are >0.</p>

<p>This is my list:</p>

<pre><code>paying=[0,0,0,1,0,3,4,0,5]
</code></pre>

<p>And this is the desired output:</p>

<pre><code>[3,5,6,8]

rdo=paying[paying&gt;0]
</code></pre>

<p>and tried:</p>

<pre><code>rdo=paying.index(paying&gt;0)
</code></pre>

<p>The output is in both cases </p>

<pre><code>typeerror &gt; not suported between instances of list and int
</code></pre>
