def getEmails(): """ Returns the email addresses of all the attendees """ f = open("alist", "r") print("Emails:") for line in f: name, email, company, state = line.split(',') a = Attendee(name, email, company, state) em = a.getEmail() print(em) f.close()
def nameAndEmail(): """ Returns the name and email address of every attendee """ f = open("alist", "r") print("Name: Email:") print("-----------------------------------") for line in f: name, email, company, state = line.split(',') a = Attendee(name, email, company, state) em = a.getEmail() na = a.getName() print("{0:20} {1:20}".format(na, em)) f.close()