2 Antworten
+ 2
By checking your code, I think that you are trying to get user name and score, store them into a data structure and then get the minimum score. the best way to go is using a dictionary instead of a list
24th Aug 2018, 2:53 PM
Ramzi Zelfani
Ramzi Zelfani - avatar
+ 2
q=[('AAA',70),('BBB',60),('CCC',70)] print(q) print(min(q, key=lambda i: i[1]))
24th Aug 2018, 3:05 PM
Louis
Louis - avatar