A way out of several cycles
📁 List, Advanced Python Topics
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, and if there are words from one list and none from the other, then get a certain message.
You cannot break out of 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: No answers yet.
Log in to leave an answer