と がlist1
ありlist2
ます。list2
から削除する必要がある単語のグループですlist1
。たとえば、次のとおりです。
list1=['paste', 'text', 'text', 'here', 'here', 'here', 'my', 'i', 'i', 'me', 'me']
list2=["i","me"]
望ましい出力:
list3=['paste', 'text', 'text', 'here', 'here', 'here', 'my']
「for」を使用してさまざまなバージョンを試しましたが、これまでのところ結果はありません。
どんなアイデアでも大歓迎です!