On Sep 12, 2012 4:53 PM, "Ashley Fowler" <afowl...@broncos.uncfsu.edu> wrote: > > I am trying to complete the following below: > > > You also need to write a function "printList" of one parameter that > takes a list as its input and neatly prints the entire contents of the > list in a column. Each student in the list should be printed using __str__. > > > So far i have: > > > def printList(lists): > print("First Name\tLast Name\tCredits\tGPA") > for i in lists: > print (i) > > > Any Suggestions or Corrections?
Looks good to me. My only suggestion is to use more descriptive names. I would have called it 'students' instead of 'lists' and 'student' instead of 'i'. I don't really like 'printList' either but I guess your stuck with that. Oscar
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor