You will be given a list of at least three you're to split into two parts if there is an even number of items, split into equal parts, if not split into two parts with one having only one item than the other. They must be in the same arrangement as they were given to you
def split(arr):
arr = arr[::-1]
return [arr.pop() for x in range(len(arr)//2)], [item for item in arr][::-1]
import codewars_test as test
# TODO Write tests
import solution # or from solution import example
# test.assert_equals(actual, expected, [optional] message)
@test.describe("Example")
def test_group():
@test.it("test case")
def test_case():
test.assert_equals(split([1,2,3,4,5,6,7]), ([1,2,3], [4,5,6,7]))
test.assert_equals(split(["a","b","c","d","e","g"]), (["a","b","c"],["d","e","g"]))
test.assert_equals(split([1,2,3]), ([1],[2,3]))