Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Pop and Append solution in Clear category for Replace First by Bernardo_Pereira
from typing import Iterable
def replace_first(items: list) -> Iterable:
if len(items) >= 1:
popped = items.pop(0)
items.append(popped)
return items
Sept. 8, 2021
Comments: