<pre><code>product_pool=["#101 BUMP STOPPER RAZOR BUMP TREATMENT SENSITIVE SKIN FORMULA",
"#W65066CS - Cell phone, Triangle wand & 5 sections lip gloss",
"(Archived)S.O.S. Steel Wool Soap Pads",
"(ARCHIVED) HTH Spa pH Increaser",
"****GLUE STICKS",
"-20°F Splash Windshield Washer Fluid",
"01127 – Fing’rs Mighty Drop, 3g",
"10-01130-Brush On Nail Glue (Three Bond TB1743)",
"Aveeno® Continuous Protection Sunblock Spray Products"]
</code></pre>
<p>还有一些额外的空间,但这可能是一种方法。你知道吗</p>
<pre><code>import string
goodChars = string.ascii_letters + '.' + ' '
cleaned = [''.join(i for i in word if i in goodChars) for word in product_pool]
>>> cleaned
[' BUMP STOPPER RAZOR BUMP TREATMENT SENSITIVE SKIN FORMULA',
'WCS Cell phone Triangle wand sections lip gloss',
'ArchivedS.O.S. Steel Wool Soap Pads',
'ARCHIVED HTH Spa pH Increaser',
'GLUE STICKS',
'F Splash Windshield Washer Fluid',
' Fingrs Mighty Drop g',
'Brush On Nail Glue Three Bond TB',
'Aveeno Continuous Protection Sunblock Spray Products']
</code></pre>
<p>你可以玩你想保留的角色,在<a href="https://docs.python.org/2/library/string.html#string-constants" rel="nofollow">string constants</a>中查看<code>string.punctuation</code>、<code>string.ascii_letters</code>等</p>