Pyspark RDD: find index of an element
<p>I am new to pyspark and I am trying to convert a list in python to rdd and then I need to find elements index using the rdd. For the first part I am doing:</p>

<pre><code>list = [[1,2],[1,4]]
rdd = sc.parallelize(list).cache()
</code></pre>

<p>So now the rdd is actually my list. The thing is that I want to find index of any arbitrary element something like "index" function which works for python lists. I am aware of a function called zipWithIndex which assign index to each element but I could not find proper example in python (there are examples with java and scala).</p>

<p>Thanks.</p>