Ive got a list which actually hold indices for another list. Hence I want to pick out the consecutive numbers from this list
index_list=[3,4,8,9,35,36,37]
from which i want the output as
[3:4], [8:9], [35:37]
---------------------MOTIVE:---------------------
I have another master list of words, which has 80 words.
master_list=['was,'it','to,'go,'I'.........]
Thus the consecutive indices will help me pick out the required words from master_list as
master_list[3:4], master_list[8:9], master_list[35:37]