A command-line contact book built in Python.
- Add contacts with name, phone, and email
- Search for a contact by name
- Delete a contact
- Display all saved contacts
python contact_book.pyWhen you run the program, a menu appears:
What do you want to do?
1. Add contact
2. Search contact
3. Delete contact
4. Display all contacts
5. Exit
Type the number or name of the option and press Enter.
- Dictionaries — storing related data as a single unit
- Lists of dictionaries — the core data structure used in real backends and APIs
- Functions — breaking code into reusable, focused blocks
- Variable scope — the difference between local and global variables
for/else— running code only when a loop completes without abreak- Input validation — using
try/exceptwith a nested loop to re-prompt on bad input - Application loop — building a menu-driven CLI program
contact_book.py # main program
README.md # this file
Data is stored in memory only — contacts are lost when the program exits. Persistent storage (saving to a file or database) will be added in a future project.