リストからマッチした要素を抜きたい 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)]

U1and0U1and0 のブックマーク 2016/09/07 21:12

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

In Python, how do I remove from a list any element containing certain kinds of characters?

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう