Basically how I'd like it to be, is:
- Loop that checks if string contains one of the strings/items from the list. Basically, "for when current index of list returns true upon finding, append that item as string to a new list"
Example from another post:
some_list = ['abc-123', 'def-456', 'ghi-789', 'abc-456']
for any("abc" in s for s in some_list):
#s isn't the index, right?
Well, the question basically is, how do I do the above. Sorry for my poor formatting and English, and such.
Example:
I have a string "La die la Blablabla and flowers are red"
I have an array TheArray, ['Blablabla', 'thisonewillnotbefound', 'flowers', 'thisonenoteither', 'red']
And I need a loop that goes through every item in the array, and whenever it finds one that exists in it, it will be appended to a completely new list.