Refactored print_students to iterate through student attributes to build the string to print for each student