Can please someone write the following list comprehension in simple for loops and statements.
new_words = ' '.join([word for word in line.split() if not
any([phrase in word for phrase in char_list])])
I wrote the above list comprehension in the following code but it doesn't work.
new_list = []
for line in in_list:
for word in line.split():
for phrase in char_list:
if not phrase in word:
new_list.append(word)
return new_list
Thanks