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