Skip to content

About

python based cli contact book

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

pycontacts

A command-line contact book built in Python.

What it does

  • Add contacts with name, phone, and email
  • Search for a contact by name
  • Delete a contact
  • Display all saved contacts

How to run

python contact_book.py

Usage

When 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.

What I learned

  • 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 a break
  • Input validation — using try/except with a nested loop to re-prompt on bad input
  • Application loop — building a menu-driven CLI program

Project structure

contact_book.py   # main program
README.md         # this file

Notes

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.

About

python based cli contact book

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages