Dictionary help

2014-02-18 Thread kjakupak
So let's say I have a file and it looks like this: Title 1: item Title 2: item etc Is it possible to use a dictionary for something like the input above? Because I want to be able to use the input above to delete the Title 1 and Title 2 but still show the items (on separate lines). Basically

Re: Dictionary help

2014-02-18 Thread Tim Chase
On 2014-02-18 10:30, kjaku...@gmail.com wrote: So let's say I have a file and it looks like this: Title 1: item Title 2: item etc Is it possible to use a dictionary for something like the input above? Because I want to be able to use the input above to delete the Title 1 and Title 2 but

Re: dictionary help

2009-08-11 Thread Dave Angel
Krishna Pacifici wrote: Hi, kind of a newbie here, but I have two questions that are probably pretty simple. 1. I need to get rid of duplicate values that are associated with different keys in a dictionary. For example I have the following code. s={} s[0]=[10,2,3] s[10]=[22,23,24]

Re: dictionary help

2009-08-11 Thread Krishna Pacifici
Thanks for the help. Actually this is part of a much larger project, but I have unfortunately pigeon-holed myself into needing to do these things without a whole lot of flexibility. To give a specific example I have the following dictionary where I need to remove values that are duplicated

Re: dictionary help

2009-08-11 Thread MRAB
Krishna Pacifici wrote: Thanks for the help. Actually this is part of a much larger project, but I have unfortunately pigeon-holed myself into needing to do these things without a whole lot of flexibility. To give a specific example I have the following dictionary where I need to remove

Re: dictionary help

2009-08-11 Thread Simon Forman
On Aug 11, 11:51 am, MRAB pyt...@mrabarnett.plus.com wrote: Krishna Pacifici wrote: Thanks for the help. Actually this is part of a much larger project, but I have unfortunately pigeon-holed myself into needing to do these things without a whole lot of flexibility. To give a specific

Re: dictionary help

2009-08-11 Thread Krishna Pacifici
Wow, thanks MRAB and Simon, you guys are good. I guess I will go ahead and ask the next question that has also stumped me for awhile now. So basically I need to loop through the values in the new dictionary and append attributes of a class object. Each of the values (and keys) represent a

Re: dictionary help

2009-08-11 Thread MRAB
Krishna Pacifici wrote: Wow, thanks MRAB and Simon, you guys are good. I guess I will go ahead and ask the next question that has also stumped me for awhile now. So basically I need to loop through the values in the new dictionary and append attributes of a class object. Each of the values

dictionary help

2009-08-10 Thread Krishna Pacifici
Hi, kind of a newbie here, but I have two questions that are probably pretty simple. 1. I need to get rid of duplicate values that are associated with different keys in a dictionary. For example I have the following code. s={} s[0]=[10,2,3] s[10]=[22,23,24] s[20]=[45,5] s[30]=[2,4]

Re: dictionary help

2009-08-10 Thread J. Cliff Dyer
On Mon, 2009-08-10 at 22:11 -0400, Krishna Pacifici wrote: Hi, kind of a newbie here, but I have two questions that are probably pretty simple. 1. I need to get rid of duplicate values that are associated with different keys in a dictionary. For example I have the following code. s={}

Re: Dictionary help

2007-11-01 Thread wes weston
Steve wrote: I'm currently working on a little database type program is which I'm using a dictionary to store the information. The key is a component a and the definition is a list of parts that make up the component. My problem is I need to list out several components, but not all, and

Re: Dictionary help

2007-11-01 Thread Steve
On Thu, 01 Nov 2007 04:16:10 -0700, wes weston wrote: Steve wrote: I'm currently working on a little database type program is which I'm using a dictionary to store the information. The key is a component a and the definition is a list of parts that make up the component. My problem is I need

Dictionary help

2007-10-31 Thread Steve
I'm currently working on a little database type program is which I'm using a dictionary to store the information. The key is a component a and the definition is a list of parts that make up the component. My problem is I need to list out several components, but not all, and there associated

Re: Dictionary help

2007-10-31 Thread Larry Bates
Steve wrote: I'm currently working on a little database type program is which I'm using a dictionary to store the information. The key is a component a and the definition is a list of parts that make up the component. My problem is I need to list out several components, but not all, and

Re: Dictionary help

2007-10-31 Thread Steve
On Wed, 31 Oct 2007 17:02:49 -0500, Larry Bates wrote: Steve wrote: I'm currently working on a little database type program is which I'm using a dictionary to store the information. The key is a component a and the definition is a list of parts that make up the component. My problem is I