Checkpoint 5.31.1.
Create a function called
second_half
that takes in lst
as a parameter and returns the second half of lst
. For example, second_half([1])
should return [1]
, second_half([1, 2, 3])
should return [2, 3]
, and second_half([1, 2, 3, 4])
should return [3, 4]
.