title: How to compare elements in list-of-lists?
body: <p>I have a list which contains list of elements(the number of elements in each inner list are not same) and I want to group all the elements in same index into separate groups and return maximum values in each group:
  for example,</p>
  <pre><code>elements = [[89, 213, 317], [106, 191, 314], [87]]
  </code></pre>
  <p>I want to group these elements like this,</p>
  <pre><code>groups = [[89,106,87],[213,191],[317,314]]
  </code></pre>
  <p>the expected result is the maximum values of each list in groups : 106 ,213 and 317</p>
  <p>I tried to group elements using following code:</p>
  <pre><code>w = zip(*elements)
  result_list = list(w)
  print(result_list)
  </code></pre>
  <p>output I got  is</p>
  <pre><code>[(89, 106, 87)]
  </code></pre>