I have a sets with student-name and marks inside list.
marks = [{"Rajesh", 76}, {"Suresh", 56}, {"Vijay", 62}]
I want to get greater than 60 marks from the above sets.
Result:
[{"Rajesh", 76},{"Vijay", 62}]
I have tried
marks = [{"Rajesh", 76}, {"Suresh", 56}, {"Vijay", 62}]
hi= [i for i in marks if list(i)[1]>60]
print(hi)
" is not helpful, because it does not tell us: **what happened** when you tried running the code? **How is that different** from what you want? **What is your understanding** of that difference? **What do you need to know** in order to solve the problem?
– Karl Knechtel Oct 13 '22 at 06:27