Thank you guys, you are great!
--
http://mail.python.org/mailman/listinfo/python-list
Clodoaldo Pinto wrote:
> I know how to format strings using a dictionary:
>
> >>> d = {'list':[0, 1]}
> >>> '%(list)s' % d
> '[0, 1]'
>
> Is it possible to reference an item in the list d['list']?:
>
> >>> '%(list[0])s' % d
> Traceback (most recent call last):
> File "", line 1, in ?
> KeyError:
Clodoaldo Pinto wrote:
> I know how to format strings using a dictionary:
>
d = {'list':[0, 1]}
'%(list)s' % d
> '[0, 1]'
>
> Is it possible to reference an item in the list d['list']?:
>
'%(list[0])s' % d
> Traceback (most recent call last):
> File "", line 1, in ?
> KeyError:
I know how to format strings using a dictionary:
>>> d = {'list':[0, 1]}
>>> '%(list)s' % d
'[0, 1]'
Is it possible to reference an item in the list d['list']?:
>>> '%(list[0])s' % d
Traceback (most recent call last):
File "", line 1, in ?
KeyError: 'list[0]'
Regards, Clodoaldo Pinto
--
htt