I'm trying to split a string by the positions given from a list, and add the parts to a new list. I start with:
seq = 'ATCGATCGATCG'
seq_new = []
seq_cut = [2, 8 , 10]
I would like to get:
seq_new = ['AT', 'CGATCG', 'AT', 'CG']
The list with the positions is variable in size and values. How can I process my data like this?