私はこのようになります文字列を持っている:私がやりたい何文で入力し、スペースを取り除く
<type 'str'>
Hi George,
Thanks for sending me your report.
Ill take a look at it and get back to you tomorrow.
はこのように見ている1つの文字列にこれを変換することです:
Hi George, Thanks for sending me your report. Ill take a look at it and get back to you tomorrow.
どのように私はこれを行うことができますか?
'str.replace( '\ n'、 '')' –
strip-str.strip()を使用してください。 –
@DineshPundkarは動作しません。 'strip'は開始時と終了時にのみ文字を削除します。 –