I am new to Python, is there any best way to resolve below issue list slicing
I have main list called
result = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
I would like to slice above list divide 12 and expecting to have the following output:
new_result = {
'One' : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
'Two' : [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
'Three' : [25, 26]
}