string split
Dennis Lee Bieber
wlfraed at ix.netcom.com
Mon Dec 9 19:16:23 EST 2002
lily fed this fish to the penguins on Monday 09 December 2002 02:09 pm:
>
> 'TypeError: list objects are unhashable'
>
> What is my mistake in the above code?
>
As others have mentioned, you likely are NOT passing in a string, but
rather a list of strings. If you used readlines() then the data is not
a string, but a list with each line being an entry in the list (though
the newline is still at the end of each such entry). IOW, the "string"
has already been split -- though you might want to strip the newline
from the end of each.
--
> ============================================================== <
> wlfraed at ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> wulfraed at dm.net | Bestiaria Support Staff <
> ============================================================== <
> Bestiaria Home Page: http://www.beastie.dm.net/ <
> Home Page: http://www.dm.net/~wulfraed/ <
More information about the Python-list
mailing list