How to convert " " in a string to blank space?
fredrik at pythonware.com
Mon Oct 30 19:01:15 CET 2006
> Is there any simple way to solve this problem?
corresponds to a non-breaking space, chr(160). if you're only
dealing with this specific XML/HTML entity, you can do
text = text.replace(" ", " ")
text = text.replace(" ", chr(160))
to handle arbitrary entities and character references, pass the data
through an HTML or XML parser, or use something like:
More information about the Python-list