needs help in how to translate ≾
Ian Maurer
ian_maurer at yahoo.com
Wed Sep 17 16:50:41 EDT 2003
This code accomplishes that goal... but it's not very reusable. At
a minimum you need to put the (non-print) steps in a function.
>>> text = "(('≾Hello World≾'),(''))"
>>> tupl = eval(text)
>>> print tupl
('≾Hello World≾', '')
>>> s = tupl[0]
>>> print s
≾Hello World≾
>>> final = s.replace("≾", '"')
>>> print final
"Hello World"
>>>
Good Luck!
Ian Maurer
--- "Raaijmakers, Vincent (IndSys, GE Interlogix)"
<Vincent.Raaijmakers at ge.com> wrote:
> As a newbie in coding in encoding I need some help from the guru
> here.
> When I get information from a user database (mySQL) I get text that
> looks like:
>
> (('≾Hello World≾'),(''))
>
> How can I create this info into a string that looks like:
> "Hello World"
>
> Because what I know is that ≾ stands for the character "
>
> Must be veeeeerrrrryyyy simple, but how?
>
> Thanks,
> Vincent
>
> --
> http://mail.python.org/mailman/listinfo/python-list
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
More information about the Python-list
mailing list