Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Try pop() solution in Uncategorized category for Replace Last by paf
from typing import Iterable
def replace_last(line: list) -> Iterable:
try:
line.insert(0, line.pop())
except IndexError:
pass
return line
March 7, 2023
Comments: