I have a list of strings and now I want to extract all strings between two strings containing specific keywords (including those two strings).
example_list = ['test sentence', 'the sky is blue', 'it is raining outside', 'mic check', 'vacation time']
keywords = ['sky', 'check']
The result I want to achieve:
result = ['the sky is blue', 'it is raining outside', 'mic check']
So far, I couldn't figure it out myself. Maybe it is possible with two loops and using regex?