lets say i have this list:
all list is: [512, 512, 2048, 512, 2048, 2048, 2048, 512, 256]
and i have number k who represent the length of the list. what i try to get is to split the list, where the length of the list of lists is the squre of number k, so this is what i need to get:
[[512, 512, 2048], [512, 2048, 2048],[2048, 512, 256]]
after that i want to sort al sub list
for i in range(math.ceil(math.sqrt(k)):
sort(list[i]
what is the best way to do it?