I have this list of objects which have p1, and p2 parameter (and some other stuff).
Job("J1", p1=8, p2=3)
Job("J2", p1=7, p2=11)
Job("J3", p1=5, p2=12)
Job("J4", p1=10, p2=5)
...
Job("J222",p1=22,p2=3)
With python, I can easily get max value of p2 by
(max(job.p2 for job in instance.jobs))
but how do I get the value of p1, where p2 is the biggest?
Seems simple, but I can't get it anyway... Could You guys help me?