Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Replace First by rybld2
from typing import Iterable
def replace_first(items: list) -> Iterable:
# your code here
return items[1::]+[items[0]] if len(items)> 1 else items
Jan. 8, 2021
Comments: