Questions tagged «punctuation»

24
从字符串中删除标点符号的最佳方法
Наэтотвопросестьответына 堆栈溢出нарусском:Какнайтисимволыизкортежа(, '', '!' '?')встрокеиудалитьих? 似乎应该有一个比以下方法更简单的方法: import string s = "string. With. Punctuation?" # Sample string out = s.translate(string.maketrans("",""), string.punctuation) 在那儿?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.