List slicing solution in Clear category for Replace Last by kkkkk
from typing import Iterable
def replace_last(items: list) -> Iterable:
"""Return the items with the first item moved to the end of the list."""
return items[-1:] + items[:-1]
Feb. 1, 2020