I want to be able to split a list of items when reaching a capitalized word, for example:
Input:
s = ['HARRIS', 'second', 'caught', 'JONES', 'third', 'Smith', 'stole', 'third']
Output:
['HARRIS', 'second', 'caught']
['JONES', 'third']
['Smith', 'stole', 'third']
Would it be best to approach this problem using s.index('some regex') and then split the list accordingly at those given indices?