No, we won’t use this one ;)

Let’s say that we have a text file student_records.txt . Each line contains a student name and age. We want to parse student names and their ages.

#student_records.txtgreg:15
matthew:14
ram:16
raju:14

Our first approach would be to read the files and store the values in a list/dictionary.

def read_student_records(path)…

Saikat Kumar Dey

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store