LearnPy Hub
← Pandas: DataFrames problems
Hard

Look Up by Name

After the students, query names follow one per line until a second END. Set the name column as the index and print each query's dept cgpa using .loc, or not found.

Input

Students, END, names, END.

Output

Lines.

Sample 1

Input
Mim CSE 3.82 120
Rafi EEE 3.41 98
Sara CSE 3.95 132
Tuhin BBA 3.60 110
Nadia CSE 3.71 125
END
Sara
Bob
END
Output
CSE 3.95
not found

Sample 2

Input
A CSE 3.00 100
END
A
END
Output
CSE 3.0
solution.py
Output appears here
Look Up by Name · Python practice problem · LearnPy Hub