示例#1
0
            name_of_the_person_that_will_be_changed = input(
                'Type the name that will be changed: ').strip().upper()
            if contact.check_if_name_exists(
                    list_of_contacts, dic,
                    name_of_the_person_that_will_be_changed):
                contact.show_wanted_contact(
                    list_of_contacts, dic,
                    name_of_the_person_that_will_be_changed)
                phone_of_the_person_that_will_be_changed = input(
                    'Type the phone number of the person that will be changed: '
                ).strip()
                if contact.check_if_phoneNumber_exists(
                        list_of_contacts, dic,
                        phone_of_the_person_that_will_be_changed):
                    contact.change_contact(
                        list_of_contacts, dic,
                        name_of_the_person_that_will_be_changed)
                else:
                    print('Incorrect! Try again!')
            else:
                print(
                    f'{name_of_the_person_that_will_be_changed} was not found!'
                )

        # Search contact
        elif options == '4':
            system('cls')
            name_of_the_wanted_person = input(
                'Who are you looking for? ').strip().upper()
            if contact.check_if_name_exists(list_of_contacts, dic,
                                            name_of_the_wanted_person):