1def split_list(a_list, number):
2 splitNumber = len(a_list) // number
3 result = [a_list[x:x+splitNumber] for x in range(0, len(a_list), splitNumber)]
4 if(len(result) > number):
5 result[len(result) - 2] = result[len(result) - 2]+ result[len(result)-1]
6 result.pop()
7 return result
8
9a = [i for i in range(11)]
10print(split_list(a,3))