Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Replace First by mscislaw
from typing import Iterable
from collections import deque
def replace_first(items: list) -> Iterable:
deque_items = deque(items)
deque_items.rotate(-1)
return deque_items
May 2, 2021