A = [1,2,3,4,5,6]B = A[:len(A)//2]C = A[len(A)//2:]
如果需要功能:
def split_list(a_list): half = len(a_list)//2 return a_list[:half], a_list[half:]A = [1,2,3,4,5,6]B, C = split_list(A)

A = [1,2,3,4,5,6]B = A[:len(A)//2]C = A[len(A)//2:]
如果需要功能:
def split_list(a_list): half = len(a_list)//2 return a_list[:half], a_list[half:]A = [1,2,3,4,5,6]B, C = split_list(A)