Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
10-liner: Sort By Catching IndexError solution in Uncategorized category for Sort by Removing by Stensen
def sort_by_removing(values: list) -> list:
copy = values.copy()
values *= 0
for n in copy:
try:
if n < values[-1]: continue
values.append(n)
except IndexError: values.append(n)
finally: print(values)
return values
Oct. 16, 2020
Comments: