Re: Getting a list value from key/value pair

2011-09-18 Thread Kayode Odeyemi
On Sun, Sep 18, 2011 at 11:22 AM, Vincent Vande Vyvre < vincent.vandevy...@swing.be> wrote: > ** > Le 18/09/11 11:39, Kayode Odeyemi a écrit : > > items = {'fees':[('status','pending'), ('timeout',60)], > 'hostel':[('status', > 'pending'), ('timeout','120')]} > > Like that: > > # -*- coding: utf-

Re: Getting a list value from key/value pair

2011-09-18 Thread Kayode Odeyemi
On Sun, Sep 18, 2011 at 11:25 AM, Vincent Vande Vyvre < vincent.vandevy...@swing.be> wrote: > ** > Le 18/09/11 11:39, Kayode Odeyemi a écrit : > > Hi all, > > > If I have a list with key/value pair, how do I get the value of the key? > > > I'm working with this code snippet: > > >>> items = {'fees

Re: Getting a list value from key/value pair

2011-09-18 Thread Kayode Odeyemi
On Sun, Sep 18, 2011 at 11:22 AM, Vincent Vande Vyvre < vincent.vandevy...@swing.be> wrote: > ** > Le 18/09/11 11:39, Kayode Odeyemi a écrit : > > items = {'fees':[('status','pending'), ('timeout',60)], > 'hostel':[('status', > 'pending'), ('timeout','120')]} > > Like that: > > # -*- coding: utf-

Re: Getting a list value from key/value pair

2011-09-18 Thread Vincent Vande Vyvre
Le 18/09/11 11:39, Kayode Odeyemi a écrit : Hi all, If I have a list with key/value pair, how do I get the value of the key? I'm working with this code snippet: >>> items = {'fees':[('status','pending'), ('timeout',60)], 'host

Re: Getting a list value from key/value pair

2011-09-18 Thread Vincent Vande Vyvre
Le 18/09/11 11:39, Kayode Odeyemi a écrit : items = {'fees':[('status','pending'), ('timeout',60)], 'hostel':[('status',  'pending'), ('timeout','120')]} Like that: # -*- coding: utf-8 -*- items = {'fees':[('status','pending'), ('timeout',60)],

Re: Getting a list value from key/value pair

2011-09-18 Thread Thomas Jollans
On 18/09/11 11:39, Kayode Odeyemi wrote: > Hi all, > > If I have a list with key/value pair, how do I get the value of the key? > > I'm working with this code snippet: Python 3.2.2 (default, Sep 5 2011, 04:33:58) [GCC 4.6.1 20110819 (prerelease)] on linux2 Type "help", "copyright", "credits" or