2011-07-31 4 views
2

ユニコード文字列のこのリストを組み合わせようとしています。私は両方を使用して合計を使用して試してみました。運がない。ユニコード文字列のこのリストを組み合わせようとしています

どうすればいいですか?私はちょうど1つの大きな文字列として、これらの文字列すべてのプレーンテキスト出力が欲しいです。

[u'\nPanera Bread (NASDAQ: <a class="ticker" href="/stock/pnra#NASDAQ">PNRA</a>) is down 6 percent today over expectations of food inflation of 4.5% in Q3 and 5% for Q4. In addition, Panera Will Raise Menu Prices in Q4.', 
u'\nPNRA recently posted second quarter 2011 earnings of $1.18 per share. Reported earnings also outpaced the prior-year quarter earnings of 85 cents per share. ', 
u"\nBut shares were also lower ahead of the opening bell after the company reported weaker-than-expected same-store sales figures for its recent quarter late Tuesday. Its profit of $1.18 a share topped analysts' consensus call by a penny.", 
u'\nFor the twenty-six weeks ended June 28, 2011, net income was $68 million, or $2.27 per diluted share. These results compare to net income of $53 million, or $1.67 per diluted share, for the twenty-six weeks ended June 29, 2010, and represent a 36% year-over-year increase in diluted earnings per share.\n'] 
+0

を交換すると? – JBernardo

+0

'' '.join(my_list) 'も私のために働いていますが、正しい方法は' u '' join(my_list)'でなければなりません。 – redShadow

+0

Andrewにはどんなエラーがありますか? – BrainStorm

答えて

9

unicode.joinを使用してください。

u''.join(that_list) 
1

私は両方の合計を使用してだけでなく、結合を使用してみました。運がない。

''.join(the_list)は問題なく機能します。

0

は、このヘルプと同じものかもしれないが、 ` '' .join(my_listという)`と間違って何

''.join(ur_list).replace('\n','') 
関連する問題