Avatar ·

A way out of several cycles

📁 список, python

There is an input list, the elements of which consist of a certain text. It is necessary to check whether there are words from one list in the elements of the list from one list, and if there are words from one, and there is no one from the other, then get a certain message.
You can’t complete several cycles after receiving the result and go to the next list element

  Some_TEXT = [ 'sense text' ,  'Another text' ,  'one me '] whitelist = [' Another ', ' me '] blacklist = [' sense ",  'Else' ]   for  text  in  side_text:   for  items  in  blacklist:   if  text.find (items)! = - 1 :   for  item  in  Whitelist:   if  text.find (item) == - 1 :   print  ( 'found!' )   else :   print  ( '' '' not Found ')     

I also ask you to forgive for possible errors or typos in the code.