Re: [Tutor] 3 Dimensional Dictionaries

2013-07-23 Thread David Hutto
You could find several url's to scrape the data from, and I believe it was mentioned you could use a list of dicts, but it seems that you might want to sub tier your dicts, It's been a while since I've pythoned so this a little longer that usual, but this may help if you pull in the countries/conti

Re: [Tutor] 3 Dimensional Dictionaries

2013-07-22 Thread Sunil Tech
On Tuesday, July 23, 2013, Sunil Tech wrote: > THANK YOU ALL for your time. > > The first format which I pasted was from the DB > > The second format(exactly the same), is to be sent to the view. > > If the logic can be fitted in One or two methods it'll help me to easily understand & to apply. >

Re: [Tutor] 3 Dimensional Dictionaries

2013-07-22 Thread Sunil Tech
THANK YOU ALL for your time. The first format which I pasted was from the DB The second format(exactly the same), is to be sent to the view. If the logic can be fitted in One or two methods it'll help me to easily understand & to apply. so I request you to help... On Sunday, July 21, 2013, Al

Re: [Tutor] 3 Dimensional Dictionaries

2013-07-20 Thread Alan Gauld
On 20/07/13 11:17, Sunil Tech wrote: Hi Everyone, I have a list of dictionaries like world = [{'continent':'Asia','continent_code':1,'ocean':'Pacific','country':'India','country_code':1,'state':'Kerala', 'state_pin':51}, i am trying to to make it in this format

Re: [Tutor] 3 Dimensional Dictionaries

2013-07-20 Thread Steven D'Aprano
On 20/07/13 20:17, Sunil Tech wrote: Hi Everyone, I have a list of dictionaries like Hi Sunil, A couple of style issues here. Please put spaces between parts of your code, for two reasons. Firstly, it makes it a lot easier to read, or perhaps I should say, notusingspacesmakesitmuchharder

Re: [Tutor] 3 Dimensional Dictionaries

2013-07-20 Thread Dave Angel
On 07/20/2013 06:17 AM, Sunil Tech wrote: Hi Everyone, I have a list of dictionaries like world = [{'continent':'Asia','continent_code':1,'ocean':'Pacific','country':'India','country_code':1,'state':'Kerala', 'state_pin':51}, {'continent':'Asia','continent_code':1,'ocean':'Pacific','coun

Re: [Tutor] 3 Dimensional Dictionaries

2013-07-20 Thread Sunil Tech
Hi, yes Dominik & the result should be in that format as stated. On Sat, Jul 20, 2013 at 3:58 PM, Dominik George wrote: > Hi, > > > world = > > > [{'continent':'Asia','continent_code':1,'ocean':'Pacific','country':'India','country_code':1,'state':'Kerala', > > 'state_pin':51}, > > [...] >

Re: [Tutor] 3 Dimensional Dictionaries

2013-07-20 Thread Dominik George
Hi, > world = > [{'continent':'Asia','continent_code':1,'ocean':'Pacific','country':'India','country_code':1,'state':'Kerala', > 'state_pin':51}, > [...] > > i am trying to to make it in this format > to clarify the task at hand: this is comparible to SQL's GROUP BY clause, right? -nik -

[Tutor] 3 Dimensional Dictionaries

2013-07-20 Thread Sunil Tech
Hi Everyone, I have a list of dictionaries like world = [{'continent':'Asia','continent_code':1,'ocean':'Pacific','country':'India','country_code':1,'state':'Kerala', 'state_pin':51}, {'continent':'Asia','continent_code':1,'ocean':'Pacific','country':'India','country_code':1,'state':'Karnat