string split

lily utakecare2 at yahoo.com
Mon Dec 9 17:09:29 EST 2002


Hello,

             I had a question with split function in strings:

My string is:

Requirement: O111
|


where I would like to split the string into a list of two tokens: 'Requirement: O111' and '|'

Hence my code is as follows:

name = string.split(nametrace,'\n')

But I get an exception saying 

'TypeError: list objects are unhashable'

What is my mistake in the above code?

Thank you.



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20021209/c7b35569/attachment.html>


More information about the Python-list mailing list