I am trying to segment python main list to sub-lists with appropriate suffix. For example, the Main List looks something like
M = [1,2,3,4,5,6]
I want to create a sub-lists like below
M_1_3 = [1,2,3]
M_4_6 = [4,5,6]
This is just for example as I do have a list of thousand elements. I tried the below 'For loop' but not working
for i in range(0,len(main_list),50):
start = i
end = i+50
'sub_list_'+str(start)+'_'+str(end) = main_list[start:end]