Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for Replace First by Pouf
from typing import Iterable
def replace_first(items: list) -> Iterable:
if len(items) < 2:
return items
else:
return items[1:] + [items[0]]
June 27, 2020