problems getting a single item out of a list
Andres Meza
andres.meza at nuevosmedios.ws
Wed Sep 18 12:01:09 EDT 2002
Manuel Hendel wrote:
> I try to get a single item out of a list, but after this, the single
> item is stil a list item.
>
> domainfield = fields[3:4]
>
> I just want to get a new variable with a the value of the 3rd item of
> the list fields.
>
If I understand your question, you have two ways to make it work, from
my point of view:
a) Get the value from domainfield:
domainfields = fields[3:4]
value = domainfields[0]
b) Get the value directly from the list:
value = fields[3]
I hope it helps.
Bye,
--
Andrés Meza
Technical Manager
__Nuevos Medios - NM S.A.____________________
e-mail: andres.meza at nuevosmedios.ws
day time phone: (+572)6827794 ext.102
url: www.nuevosmedios.ws
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20020918/c6f7455c/attachment.html>
More information about the Python-list
mailing list