Drunken Knight ============== Consider a non-empty list of positive :class:`int` where each number represents a position in the same list. Let's define a "jump" from position ``i`` over a list ``L`` as moving to the position ``L[i]``. Thus, jumping over a list ``L`` from a given initial position ``i0`` is doing jumps starting at ``i0`` until it jumps outside the range of ``L`` or enters a neverending loop. For example, given the list ``l = [4, 2, 0, 1]`` and initial position 3 the jumping will do the following sequence: 3, 1, 2, 0, 4. If the list was ``l = [3, 2, 0, 1]`` it would the neverending sequence 3, 1, 2, 0, 3, 1, 2, ... Write the following function in the module with the same name (file :file:`drunken_knight.py`): .. py:function:: drunken_knight(L, i0) such that *given* - ``L`` non-empty list of positive :class:`int` - ``i0`` :class:`int` **modifies** ``L`` by assigning the value -1 to all positions traversed by jumping over ``L`` from the initial position ``i0`` until it jumps on a position whose value has already been changed to -1 (or it jumps outside the range of ``L``). Per exemple: .. literalinclude:: drunken_knight-test.txt :language: python3 :start-after: --ini :end-before: --fi Disposes de doctests al fitxer :download:`drunken_knight-test.txt`.