I have a list of tuples as as follows:
list_1 = [(2,10), (3,13), (5,23)]
and also a list of strings as follows:
list_2 = [ATGCATGCGAGTGCGAGTGCGTGCGTGCAGTGCGAGTGC,
ATCGTCGTCGACGTAGCTAGCTAGCTAGCTAGCTAS,
ATGCGTACGATCGATCGATCGATCGATCGAGCTAGCTAGCT]
I want to slice the list of strings with the help of given tuple integer gaps. For example;
I want to slice the first string from indexes 2 and 10 and print out only the letters which belong to those indexes. So the result print will be as ‘GCATGCGAG’.
For the second string it should slice and select the indexes from 3-13.so the result should be ‘GTCGTCGACGTAG’. This should go on. Can somebody suggest me a code for this. Thanks in advance.