Dec-27-2018, 11:24 AM
Thanks for the input. Shouldn't it work with one class (Phonebook) only?
class Phonebook: def __init__(self, name, id, age, contact): self.name = name self.id = id self.age = age self.contact = contact def add_pb_entry(self): name = input("Please enter name:") id = input("ID: ") age = input("Please enter age:") contact = input("Please enter contact information") newentry = [] new = Phonebook.add_pb_entry(name, id, age, contact) newentry.append(new) def update_contact(self): searchid = input("Please enter the ID of the entry you want to update:") if searchid == id: contact = input("Please enter contact information") def print_pb_entries(self): print(self.name, self.id, self.age, self.contact)