Re: Working with dictionaries and keys help please!

2017-06-02 Thread Gregory Ewing
On Thu, 1 Jun 2017 10:29 am, David D wrote: Is there a way of performing this where the key will update so that is continues to work sequentially? It sounds like you don't want a dictionary at all, you want a list. You can use the index() method to find the current "key" of an entry. >>> peop

Re: Working with dictionaries and keys help please!

2017-06-01 Thread Steve D'Aprano
On Thu, 1 Jun 2017 10:29 am, David D wrote: > I have a dictionary with a 10 people, the key being a number (0-10) and the > value being the people's name. I am in the processing of Insert, Adding and > deleting from the dictionary. All seems well until I delete a person and add > a new one. The

Re: Working with dictionaries and keys help please!

2017-05-31 Thread David D
Learning about dictionaries for a database possibly in the future. On Wednesday, May 31, 2017 at 8:58:39 PM UTC-4, MRAB wrote: > On 2017-06-01 01:29, David D wrote: > > I have a dictionary with a 10 people, the key being a number (0-10) and the > > value being the people's name. I am in the proc

Re: Working with dictionaries and keys help please!

2017-05-31 Thread MRAB
On 2017-06-01 01:29, David D wrote: I have a dictionary with a 10 people, the key being a number (0-10) and the value being the people's name. I am in the processing of Insert, Adding and deleting from the dictionary. All seems well until I delete a person and add a new one. The numbers (ke

Working with dictionaries and keys help please!

2017-05-31 Thread David D
I have a dictionary with a 10 people, the key being a number (0-10) and the value being the people's name. I am in the processing of Insert, Adding and deleting from the dictionary. All seems well until I delete a person and add a new one. The numbers (keys) do not change and so I am getting