Please help me out to extract the string containing particular text. I have tried with below:
lst = [['abc', 'abgoodhj', 'rygbadkk'], ['jhjbadnm'], ['hjhj', 'iioytu'], ['hjjh', 'ghjgood1hj', 'jjkkbadgghhj', 'hjhgkll']]
for lst1 in lst:
good_wrd = [txt for txt in lst1 if txt.contains('good')]
bad_wrd = [txt for txt in lst1 if txt.contains('bad')]
I want the words that contain good and bad.