I am trying to divide a list of elements which are comma separated into chunks of unequal length. How can I divide it?
list1 = [1, 2, 1] list2 = [\"1.1.1.1\", \"
Something like:
def divideUnequal(list1, list2): counter=0 step=0 divided=[] for count in list1: step= counter+ count sublist= list2[counter: step] counter= step divided.append(sublist) return divided