回答此问题可获得 20 贡献值,回答如果被采纳可获得 50 分。
<p>嘿,我有个问题:
我有一张单子</p>
<pre><code>l = [ 'a', 'b', '"', 'c', 'd', '"', 'e']
</code></pre>
<p>现在我想用前面的元素替换所有的'''。
这意味着:</p>
<p>输出=<code>[ 'a', 'b', 'b', 'c', 'd', 'd', 'e']</code></p>
<p>混凝土:</p>
<pre><code> Straßen_list = ['Katharinenstraße', 'iakobstraße', 'Katharinenstraße',
'ilhelmsplatzKatharinen-', 'Hauptstätterstraße', '"', 'Wilhelmsplatzalter',
'"', 'Schlosscrstraße', 'Houptstcktterstraße1^Uhlandapotheke\n', ';"',
'!Torstraße[Einblick', 'HauptstätterstraßeNr50-36', '"', '"',
"Hauptstätterstraße;Hs.i'ir.24", 'Brückenstraße', 'HauptstätterstraßeÖ',
'Holzstraße', 'Rosenstraße', 'Holzstraße2', 'tilhlcurr',
'HolzstraßeDanziger', 'EsslingerstraßeDanz.Freiheit', 'Danz.Freiheit',
'Esslinger', 'RosenstraßeEsslinger8tr»', 'Esslinger', 'Esslinget',
'bagnerstraße', 'Esslinger', 'Leonhardsplatz!Blickgegen', '*Holz-', '"', '"',
'"', '<hardskirche\n', '', '']
</code></pre>
<p>我需要把所有的''替换成元素。你知道吗</p>
<p>谁能帮帮我!!我快疯了。。。你知道吗</p>