• + 0 comments

    Python 1 line solution using list comprehension :

    print(f"{sum(x for x in student_marks[query_name])/3:.2f}")