divide a list into three separate list
def divide(a_list): a_list1 = a_list[:len(a_list) // 3] a_list2 = a_list[len(a_list) // 3:2 * len(a_list) // 3] a_list3 = a_list[2 * len(a_list) // 3:] return a_list[:len(a_list) // 3], a_list[len(a_list) // 3:2 * len(a_list) // 3], a_list[2 * len(a_list) // 3:] divide( [1, 2, 3, 4, 5, 6, 7, 8, 9] )