Strangely I met with this problem when I was trying to take out contents from an excel file with Python using xlrd modulus.
The example is like below:
Python 2.7.6 (default, Mar 22 2014, 22:59:38)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a="text:u'ethos'"
>>> a
"text:u'ethos'"
>>> a.lstrip("text:u'").rstrip("'")
'hos'
>>> b="text:u'weekend'"
>>> b
"text:u'weekend'"
>>> b.lstrip("text:u'").rstrip("'")
'weekend'
a cell reading out from xlrd is in text:u'' format for I need to get only the word.
ALthough I finally use table.cell_value() method to solve it. But I wonder why?
So why 'weekend' is working well but for word like 'ethos' is wrong?