title: Get the index of values retrieved from random.sample(list,2)?
body: <p>I have a file which contains a number of lists. I want to access the index of the values retrieved from each of these lists. I use the random function as shown below. It retrieves the values perfectly well, but I need to get the index of the values obtained.</p>
  
  <pre><code>for i in range(M):
             print(krr[i])
             print(krr[i].index(random.sample(krr[i],2)))
             nrr[i]=random.sample(krr[i],2)
  
             outf13.write(str(nrr[i]))
             outf13.write("\n")
  </code></pre>
  
  <p>I got <code>ValueError</code> saying the two values retrieved are not in the list even though they exist...</p>