student_data = [
{"name":"Budi", "score": 90},
{"name":"Nina", "score": 78},
{"name":"Rudi", "score": 91},
{"name":"Olivia","score": 76},
{"name":"Leo", "score": 80},
{"name":"Liam", "score": 67},
{"name":"Sheila","score": 76}
]
I want to get students name that have score >=80 in the list format. Expected answer :
[Budi, Rudi, Leo]
This is my code that im trying to use but somehow get error message:
for i in range(len(student_data)):
if student_data[i].values()>=80:
print(student_data[i].keys())
Is there any solution?