fork(1) download
  1. A = [
  2. (-9, [(2, 3), (5, 2), (3,1)]),
  3. (-8, [(3, 4), (5, 6), (7, 6)]),
  4. (-8, [(0, 0), (5, 0), (1, 6)]),
  5. (-9, [(2, 3), (4, 2), (4, 5)]),
  6. ]
  7.  
  8. max_value = max(x[0] for x in A)
  9. print [x for x in A if x[0] == max_value]
Success #stdin #stdout 0.03s 6356KB
stdin
Standard input is empty
stdout
[(-8, [(3, 4), (5, 6), (7, 6)]), (-8, [(0, 0), (5, 0), (1, 6)])]