PythonExamplesOn this pageTitle even, odd = sum(nums[::2]), sum(nums[1::2]) Deque https://docs.python.org/3/library/collections.html#collections.deque