There are likely lots of ways to do this. Here's one based on reduce() and islice():
from functools import reduce
from itertools import islice
qw = [3, 4, 8, 9, 12, 13, 14]
master_list = ['Thus', 'the', 'consecutive', 'indices', 'will', 'help', 'me', 'pick', 'out', 'the', 'required', 'words', 'from', 'master_list', 'as']
def divide(value, element):
if not value[-1] or element - value[-1][-1] == 1:
value[-1].append(element)
else:
value.append([element])
return value
slices = [(array[0], array[-1]) for array in reduce(divide, qw, [[]])]
print(slices)
for sliced in slices:
print(list(islice(master_list, *sliced)))
OUTPUT
% python3 test.py
[(3, 4), (8, 9), (12, 14)]
['indices']
['out']
['from', 'master_list']
%
Note that this treats the second number in the slice in the customary Python manner in that it's one beyond what we want. If it's really the last item of what you want then modify this element with a + 1:
(array[0], array[-1] + 1)