Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
one-liner solution in Clear category for Replace Last by Bernardo_Pereira
def replace_last(line: list) -> list:
return line if len(line) <=1 else [line[-1]] + line[0:-1]
Oct. 2, 2021
Comments: