Skip to content
  • SiteMap
  • Our Services
  • Frequently Asked Questions (FAQ)
  • Support
  • About Us

UpdateGadh

Update Your Skills.

  • Home
  • Projects
    •  Blockchain projects
    • Python Project
    • Data Science
    •  Ai projects
    • Machine Learning
    • PHP Project
    • React Projects
    • Java Project
    • SpringBoot
    • JSP Projects
    • Java Script Projects
    • Code Snippet
    • Free Projects
  • Tutorials
    • Ai
    • Machine Learning
    • Advance Python
    • Advance SQL
    • DBMS Tutorial
    • Data Analyst
    • Deep Learning Tutorial
    • Data Science
    • Nodejs Tutorial
  • Blog
  • Contact us
  • Toggle search form
Create Address Book in Python with Source Code - Create Address Book

Create Address Book in Python with Source Code

Posted on September 21, 2024September 21, 2024 By Rishabh saini No Comments on Create Address Book in Python with Source Code

Introduction

Create Address Book in Python

In today’s fast-paced world, staying connected with the people who matter most can be a challenge. Whether it’s family, friends, or colleagues, keeping their contact information organized and accessible is essential. That’s where an Address Book in Python comes in. This college project isn’t just about writing code—it’s about creating a personal, practical tool that brings order to the chaos of our busy lives. As you embark on this journey, you’re not just learning Python; you’re building a bridge to the people who enrich your world, one line of code at a time.

Table of Contents

  • Introduction
  • Create Address Book in Python
  • Core Features
  • Step-by-Step Guide
    • 1. Setting Up Your Python Environment
    • 2. Designing
    • 3.Add New Contacts
    • 4. Searching
    • 5. Updating and Deleting
    • 6. Displaying All Contacts

Core Features

  1. Add New Contacts: Gather details like name, phone number, and email address.
  2. Update Existing Contacts: Modify information as needed.
  3. Delete Contacts: Remove entries that are no longer needed.
  4. Search for Contacts: Quickly find a contact by entering a name or other details.
  5. Display All Contacts: Show all stored contacts in a neat, organized format.

Step-by-Step Guide

1. Setting Up Your Python Environment

First, confirm that Python is set up on your computer. It is available for download on the official Python website. Choose an Integrated Development Environment (IDE) like PyCharm, VS Code, or even IDLE for writing your code.

2. Designing

We’ll use a list to store our contacts, where each contact is represented by a dictionary containing the name, phone number, and email. This simple structure is ideal for handling the necessary data efficiently.

contacts = []
3.Add New Contacts

The key feature of this Address Book is its ability to take input directly from the user. Let’s start by writing a function that allows the user to add a new contact.

Add a New Contact:

def add_contact():
    name = input("Enter the contact's name: ")
    phone = input("Enter the contact's phone number: ")
    email = input("Enter the contact's email address: ")

    contact = {
        'name': name,
        'phone': phone,
        'email': email
    }
    contacts.append(contact)
    print(f"Contact {name} added successfully!")

# Example usage
add_contact()

Here, the program prompts the user for the contact’s name, phone number, and email address, storing this information in a dictionary that is then added to the contacts list.

4. Searching

Search for a Contact:

def search_contact():
    name = input("Enter the name of the contact to search for: ")
    for contact in contacts:
        if contact['name'].lower() == name.lower():
            print(f"Name: {contact['name']}, Phone: {contact['phone']}, Email: {contact['email']}")
            return
    print("Contact not found.")

# Example usage
search_contact()

This function allows the user to input a name and then searches through the contacts list to find and display the corresponding details.

5. Updating and Deleting

You’ll need features to add and remove contacts from your Address Book in order to give it greater functionality.

Update a Contact:

def update_contact():
    name = input("Enter the name of the contact to update: ")
    for contact in contacts:
        if contact['name'].lower() == name.lower():
            new_phone = input("Enter the new phone number: ")
            new_email = input("Enter the new email address: ")
            contact['phone'] = new_phone
            contact['email'] = new_email
            print(f"Contact {name} updated successfully!")
            return
    print("Contact not found.")

# Example usage
update_contact()

Delete a Contact:

def delete_contact():
    name = input("Enter the name of the contact to delete: ")
    global contacts
    contacts = [contact for contact in contacts if contact['name'].lower() != name.lower()]
    print(f"Contact {name} deleted successfully!")

# Example usage
delete_contact()
6. Displaying All Contacts

Finally, create a function that displays all stored contacts in a user-friendly format.

Display All Contacts:

def display_contacts():
    if not contacts:
        print("No contacts available.")
    else:
        for contact in contacts:
            print(f"Name: {contact['name']}, Phone: {contact['phone']}, Email: {contact['email']}")

# Example usage
display_contacts()
Create Address Book in Python with Source Code
Create Address Book in Python with Source Code
Create Address Book in Python with Source Code
Create Address Book in Python with Source Code

This function loops through the contacts list and prints out each contact’s details, ensuring that users can easily view all their contacts.

  • New Project :-https://www.youtube.com/@Decodeit2
  • PHP PROJECT:- CLICK HERE
  • create address book in python
  • connect with mysql and create address book in python
  • create address book in word
  • create address book in gmail
  • address book in python
  • address book project in python
  • address book codehs
  • Create Address Book in Python with Source Code
Post Views: 630
code Snippets Tags:address book python, build address book in python, contact book in python, contact book program in python, contact book project in python for beginners, contact book python, contact book using dictionary in python, contact boook python, create a contact book in python, phone book project in python, Python, python contact book, python for beginners, python project, Python Tutorial, simple contact book in python

Post navigation

Previous Post: E-Commerce Website Using Django Framework with Free Code
Next Post: How to make Hotel Management System in PHP

More Related Articles

E-Commerce Website Using Django Framework with Free Code - E-commerce Site E-Commerce Website Using Django Framework with Free Code code Snippets
Object-Oriented Programming Object-Oriented Programming (OOP) with Free code code Snippets
Social Media Data Automating with Python - Social Media Data Automating Social Media Data Automating with Python code Snippets

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may also like

  1. Supply Chain Management PHP and CSS
  2. Online Shopping System using PHP, MySQL with Free Source Code
  3. F1 Race Road Game in Python Free Source Code
  4. Supplier Management System in Java with Free Code
  5. Contact Management in Python with Source Code
  6. Movie Management System in Python with Source Code

Most Viewed Posts

  1. Top Large Language Models in 2025
  2. Online Shopping System using PHP, MySQL with Free Source Code
  3. login form in php and mysql , Step-by-Step with Free Source Code
  4. Flipkart Clone using PHP And MYSQL Free Source Code
  5. News Portal Project in PHP and MySql Free Source Code
  6. User Login & Registration System Using PHP and MySQL Free Code
  7. Top 10 Final Year Project Ideas in Python
  8. Online Bike Rental Management System Using PHP and MySQL
  9. E learning Website in php with Free source code
  10. E-Commerce Website Project in Java Servlets (JSP)
  • AI
  • ASP.NET
  • Blockchain
  • ChatCPT
  • code Snippets
  • Collage Projects
  • Data Science Project
  • Data Science Tutorial
  • DBMS Tutorial
  • Deep Learning Tutorial
  • Final Year Projects
  • Free Projects
  • How to
  • html
  • Interview Question
  • Java Notes
  • Java Project
  • Java Script Notes
  • JAVASCRIPT
  • Javascript Project
  • JSP JAVA(J2EE)
  • Machine Learning Project
  • Machine Learning Tutorial
  • MySQL Tutorial
  • Node.js Tutorial
  • PHP Project
  • Portfolio
  • Python
  • Python Interview Question
  • Python Projects
  • PythonFreeProject
  • React Free Project
  • React Projects
  • Spring boot
  • SQL Tutorial
  • TOP 10
  • Uncategorized
  • Online Examination System in PHP with Source Code
  • AI Chatbot for College and Hospital
  • Job Portal Web Application in PHP MySQL
  • Online Tutorial Portal Site in PHP MySQL — Full Project with Source Code
  • Online Job Portal System in JSP Servlet MySQL

Most Viewed Posts

  • Top Large Language Models in 2025 (8,613)
  • Online Shopping System using PHP, MySQL with Free Source Code (5,211)
  • login form in php and mysql , Step-by-Step with Free Source Code (4,866)

Copyright © 2026 UpdateGadh.

Powered by PressBook Green WordPress theme