problems getting a single item out of a list
peter at engcorp.com
Tue Sep 17 08:27:26 EDT 2002
Manuel Hendel wrote:
> On Tue, Sep 17, 2002 at 12:30:52AM -0700, Sean 'Shaleh' Perry wrote:
>>just use fields (you start counting at zero).
> This worked fine:
> domainfield = fields
> But the next problem is, that after a
> domainfield = string.split(fields)
> domainfield seams to be a list item again.
> print domainfield
Well, you don't show what fields contained before the
string.split, but in any case split() returns a list by
definition, so what else did you expect? If you want to
get the first item from the split list, just use
domainfield this time...
More information about the Python-list