私はしばらくこの問題に苦労してきました。私はHTMLに文字列を書き込もうとしていますが、いったんそれらを消去したらフォーマットに問題があります。ここでは例です:Python HTMLエンコーディング xc2 xa0
paragraphs = ['Grocery giant and household name Woolworths is battered and bruised. ',
'But behind the problems are still the makings of a formidable company']
x = str(" ")
for item in paragraphs:
x = x + str(item)
x
出力:
"Grocery giant and household name\xc2\xa0Woolworths is battered and\xc2\xa0bruised.
But behind the problems are still the makings of a formidable\xc2\xa0company"
所望の出力:
"Grocery giant and household name Woolworths is battered and bruised.
But behind the problems are still the makings of a formidable company"
私はあなたがこれが起こると私は修正することができますどのように理由を説明することができます願っています。前もって感謝します! XA0 \ XC2 \
ソース文字列のUnicode空白が異常であることを確認しましたか? –