サクサク読めて、アプリ限定の機能も多数!
リストからマッチした要素を抜きたい regex = re.compile(r'\b[A-Z]{3,}\b') # use only one of the following lines, whichever you prefer filtered = filter(lambda i: not regex.search(i), full) filtered = [i for i in full if not regex.search(i)]
U1and0 のブックマーク 2016/09/07 21:12
In Python, how do I remove from a list any element containing certain kinds of characters?[python][list][regex]リストからマッチした要素を抜きたい regex = re.compile(r'\b[A-Z]{3,}\b') # use only one of the following lines, whichever you prefer filtered = filter(lambda i: not regex.search(i), full) filtered = [i for i in full if not regex.search(i)]2016/09/07 21:12
このブックマークにはスターがありません。 最初のスターをつけてみよう!
stackoverflow.com2016/09/07
1 人がブックマーク・1 件のコメント
\ コメントが サクサク読める アプリです /
リストからマッチした要素を抜きたい regex = re.compile(r'\b[A-Z]{3,}\b') # use only one of the following lines, whichever you prefer filtered = filter(lambda i: not regex.search(i), full) filtered = [i for i in full if not regex.search(i)]
U1and0 のブックマーク 2016/09/07 21:12
このブックマークにはスターがありません。
最初のスターをつけてみよう!
In Python, how do I remove from a list any element containing certain kinds of characters?
stackoverflow.com2016/09/07
1 人がブックマーク・1 件のコメント
\ コメントが サクサク読める アプリです /