#! /usr/bin/python3

# creates Student objects using a data file 
# and stores them in a dictionary

from student import Student

students = {}

data_filename = input("Data filename: ")
data_file     = open(data_filename, "r")

for line in data_file:
    id, last_name, first_name = line.split(",")
    student = Student(id, last_name, first_name)
    students[id] = student
    
for id in students:
    print(students[id])
