A = [1,2,3,4,5,6]
B = A[:len(A)//2]
C = A[len(A)//2:]

If you want a function:

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)
Answer from Jason Coon on Stack Overflow
🌐
W3Schools
w3schools.com › python › numpy › numpy_array_split.asp
NumPy Splitting Array
Splitting is reverse operation of Joining. Joining merges multiple arrays into one and Splitting breaks one array into multiple.
🌐
W3Schools
w3schools.com › python › ref_string_split.asp
Python String split() Method
Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Practice Problems Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Training ... The split() method splits a string into a list.
🌐
W3Schools
devcom.w3schools.com › python › numpy › numpy_array_split.asp
NumPy Splitting Array
Splitting is reverse operation of Joining. Joining merges multiple arrays into one and Splitting breaks one array into multiple.
🌐
W3Schools
w3schools.com › python › numpy › exercise.asp
Exercise: NUMPY Split Arrays
Join Arrays3 q · Split Arrays3 q · Search Arrays3 q · Sort Arrays3 q · Filter Arrays3 q · Random3 q · Random Data Distribution3 q · Random Permutation3 q · Normal Distribution3 q · Binomial Distribution3 q · Poisson Distribution3 q · Uniform Distribution3 q ·
🌐
w3resource
w3resource.com › python-exercises › numpy › python-numpy-exercise-61.php
NumPy: Split an array of 14 elements into 3 arrays - w3resource
Write a NumPy program to split an array of 14 elements into segments of sizes 2, 4, and 8 using np.split.
🌐
W3Schools
w3schools.com › python › numpy › trypython.asp
W3Schools online PYTHON editor
Run ❯ Get your own Python server · ❯Run Code Ctrl+Alt+R Change Orientation Ctrl+Alt+O Change Theme Ctrl+Alt+D Go to Spaces Ctrl+Alt+P · [array([1, 2]), array([3, 4]), array([5, 6])]
🌐
Educative
educative.io › answers › what-is-the-array-split-method-in-numpy
What is the array split() method in Numpy?
The numpy.array_split() method in Python is used to split an array into multiple sub-arrays of equal size.
🌐
W3Schools
w3schools.com › python › numpy › numpy_array_slicing.asp
NumPy Array Slicing
Slicing in python means taking elements from one given index to another given index. We pass slice instead of index like this: [start:end]. We can also define the step, like this: [start:end:step]. ... Note: The result includes the start index, ...
Find elsewhere
🌐
w3resource
w3resource.com › numpy › manipulation › split.php
NumPy: numpy.split() function - w3resource
April 24, 2026 - In the above code, the numpy.split() function is used to split an input array 'a' at specified positions given as a list argument [4, 5, 6, 7]. This will split the array 'a' into subarrays at the positions 4, 5, 6, and 7.
🌐
Medium
medium.com › @pamyaola › 5-splitting-arrays-numpy-functions-4ccaa52c376
5 Splitting arrays in NumPy(with working and breaking examples). | by Pamyaola | Medium
June 27, 2023 - Vsplit raises an exception if an equal split is not possible. Provide links to your references and other interesting articles about NumPy arrays: NumPy official tutorial : https://numpy.org/doc/stable/user/quickstart.html · https://www.w3schools.com/python/numpy/numpy_array_split.asp ·
🌐
GeeksforGeeks
geeksforgeeks.org › python-program-for-split-the-array-and-add-the-first-part-to-the-end
Python Program to Split the array and add the first part to the end | GeeksforGeeks
March 28, 2023 - Use a list comprehension to create a new list result of the same length as the input array, where each element of the new list is computed using the formula (i + n) % arr_len where i is the index of the current element in the input array.
🌐
W3Schools
w3schools.com › python › ref_string_rsplit.asp
Python String rsplit() Method
Python Examples Python Compiler ... Study Plan Python Interview Q&A Python Training ... The rsplit() method splits a string into a list, starting from the right....
🌐
Python Guides
pythonguides.com › how-to-split-a-string-into-an-array-in-python
How To Split A String Into An Array In Python?
December 31, 2024 - This tutorial will help you understand various methods of splitting strings in Python with examples. To split a string into an array in Python, use the split() method, which divides the string based on a specified delimiter, defaulting to whitespace. For example, string.split(',') will split ...
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › how to split numpy array | using split()
Python NumPy Split Array - Using split() Function
March 27, 2024 - How to split an array into multiple arrays in Numpy? In NumPy, the numpy.split() function can be used to split an array into more than one (multiple) sub
🌐
PythonForBeginners
pythonforbeginners.com › home › how to use split in python
How to use Split in Python - PythonForBeginners.com
January 30, 2021 - To do this, you use the python split function. What it does is split or breakup a string and add the data to a string array using a defined separator.
🌐
Imperial College London
python.pages.doc.ic.ac.uk › lessons › numpy › 05-manipulation › 03-split.html
Introduction to NumPy and Matplotlib > Array split | Python Programming | Department of Computing | Imperial College London
>>> x = np.arange(1, 19).reshape((2, 9)) >>> print(x) [[ 1 2 3 4 5 6 7 8 9] [10 11 12 13 14 15 16 17 18]] >>> y = np.split(x, 3, axis=1) # split on axis 1 into 3 evenly-sized sub-arrays >>> print(y[0]) [[ 1 2 3] [10 11 12]] >>> print(y[1]) [[ 4 5 6] [13 14 15]] >>> print(y[2]) [[ 7 8 9] [16 17 18]] >>> y = np.split(x, 2, axis=0) # split on axis 0 into 2 evenly-sized sub-arrays >>> print(y[0]) [[1 2 3 4 5 6 7 8 9]] >>> print(y[1]) [[10 11 12 13 14 15 16 17 18]] >>> y = np.split(x, 4, axis=1) # attempt to split on axis 1 into 4 evenly-sized sub-arrays ValueError: array split does not result in an equal division
🌐
Codecademy
codecademy.com › docs › python:numpy › built-in functions › .split()
Python:NumPy | Built-in Functions | .split() | Codecademy
April 4, 2025 - Learn the basics of Python 3.13, one of the most powerful, versatile, and in-demand programming languages today. ... If an integer, it divides the array into equal-sized sub-arrays. If a list of indices, it splits at the specified positions.