<p>我有以下输入字符串:</p>
<pre><code>text='''Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!'''
</code></pre>
<p>到目前为止,我已经将<code>text</code>字符串拆分为<code>list</code>,如下所示:</p>
^{pr2}$
<p>现在,我想使用<code>strip</code>函数从上面的列表中删除不需要的字符,比如<code>\n\n</code>和{<cd5>}。在</p>
<p>你能帮我一下吗??在</p>