title: Access and extract value in a tuple in a list?
body: <p>I know this may be a fairly simple question, but I am struggling to figure it out for hours.</p>
  <p>I am trying to use a <code>for loop</code> to access to each of the values in the tuple to calculate the probability per tuple.</p>
  <pre><code>for i in range(len(grouped)):
      probabilities[class_number] *= summarise_list[i]
  </code></pre>
  <p>The summarise_list[i]:</p>
  <pre><code>[(3031.660194174757, 136.76461483348012, 103), (136.64077669902912, 113.70531696131526, 103), (11.03883495145631, 5.842579221772521, 103), (324.9611650485437, 233.42685474528514, 103), (36.12621359223301, 40.204057841157116, 103), (4325.728155339806, 1102.084194803101, 103), (216.28155339805826, 18.280718158399203, 103), (223.4368932038835, 17.165669057009026, 103), (140.54368932038835, 25.034398569681457, 103), (4300.592233009709, 1621.3665105421753, 103)]
  [(3031.660194174757, 136.76461483348012, 103), (136.64077669902912, 113.70531696131526, 103), (11.03883495145631, 5.842579221772521, 103), (324.9611650485437, 233.42685474528514, 103), (36.12621359223301, 40.204057841157116, 103), (4325.728155339806, 1102.084194803101, 103), (216.28155339805826, 18.280718158399203, 103), (223.4368932038835, 17.165669057009026, 103), (140.54368932038835, 25.034398569681457, 103), (4300.592233009709, 1621.3665105421753, 103)]
  ...
  ...
  </code></pre>
  <p>The idea is to iterate through the tuple, look into <code>i</code> <code>(x,x,x)</code>, compare only the first two values within <code>(x,x,x)</code> and return the highest value to be calculated in <code>probabilities[class_number]</code> multiplication.</p>
  <p>For example, <code>(3031.660194174757, 136.76461483348012, 103)</code> will return <code>3031.660194174757</code>. Next <code>i</code>, <code>(136.64077669902912, 113.70531696131526, 103)</code> will return <code>136.64077669902912</code>. <code>103</code> (the third element) will be ignored in all cases. The result of 3031, 136 and so on will be multiplied. This will need to be done in every tuple to find every probability per tuple.</p>
  <p>Efficiency is important here as I will have to process thousands of rows.</p>
  <p>Appreciate any help, thank you.</p>
  <p>Side note: I have read through <a href="https://stackoverflow.com/questions/4800811/accessing-a-value-in-a-tuple-that-is-in-a-list">Accessing a value in a tuple that is in a list</a> but still could not resolve it.</p>