Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Split List by vl.ev.ba
from typing import Any, Iterable
def split_list(items: list[Any]) -> Iterable[list[Any]]:
L=(len(items)+1)//2
if not L: return [[],[]]
return [items[:L], items[L:]]
May 21, 2026
Comments: