Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
islice solution in Creative category for Split List by Phil15
from itertools import islice
def split_list(lst):
n = (len(lst) + 1) // 2
it = iter(lst)
yield islice(it, n)
yield it
Sept. 26, 2022
Comments: