Re: Sorting Countries by Region

2007-11-19 Thread martyw
nothing, Alan wrote: > On Nov 16, 8:28 pm, martyw <[EMAIL PROTECTED]> wrote: >> i would create a class to capture country information, e.g. > > > What is the advantage of this: > >> def __cmp__(self, other): >> if self.name < other.name:

Re: Sorting Countries by Region

2007-11-16 Thread martyw
[EMAIL PROTECTED] wrote: > Hi all, > > I'm analyzing some data that has a lot of country data. What I need > to do is sort through this data and output it into an excel doc with > summary information. The countries, though, need to be sorted by > region, but the way I thought I could do it isn't

Re: Need some help...

2007-10-28 Thread martyw
[EMAIL PROTECTED] wrote: >> I want to create a program that I type in a word. > > You can see that Python has a command to input strings from the > command line. > >> chaos >> each letter equals a number >> A=1 >> B=20 >> and so on. >> So Chaos would be >> C=13 H=4 A=1 O=7 S=5 >> I want to t

Re: while statements

2007-10-16 Thread martyw
Shawn Minisall wrote: > I just learned about while statements and get why you place them around > inputs for validation, but I'm a little lost on exactly where to place > it with what condition in this program where the number of fat grams > exceeds the total number of calories so that it loops

Re: removing items from a dictionary ?

2007-07-26 Thread martyw
Stef Mientki wrote: > hello, > > I want to remove some items from a dictionary, > so I would expect this should work: > > Nets = {} > ... fill the dictionary Nets > > for net in Nets: > if net.upper() in Eagle_Power_Nets : > del Nets [ net ] > > > But it gives me > MessageF