0
Nested list in python
How do I access an element with min value in Python. https://code.sololearn.com/cwoaTB19nkDw/?ref=app https://code.sololearn.com/cwoaTB19nkDw/?ref=app
2 odpowiedzi
+ 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
+ 2
q=[('AAA',70),('BBB',60),('CCC',70)]
print(q)
print(min(q, key=lambda i: i[1]))