Can I modify the keys in a dictionary directly for Python?

How do I create a editable contact list with a menu system using python?

  • I've been given this as part of an assignment: Write a program to implements a simple contact list application. The program shall allow users to add, modify and delete entries from the contact lists. Each entry in the contact list consists of a name and a phone number. The program shall also allow the user to retrieve phone numbers by entering the names associated to those numbers. Create a menu to allow the user to access these features. Use a dictionary (hash table) to store the information of the contact list. Any ideas for how to start? My knowledge of python is pretty limited.

  • Answer:

    If your knowledge of Python is limited then I recommend working through the excellent online Dive Into Python book: http://www.diveintopython.org/toc/index.html This page explains dictionaries, which will be very useful for your project: http://www.diveintopython.org/native_data_types/index.html#odbchelper.dict

yugix24 at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.