Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Poping from sorted list solution in Clear category for Sort Except Zero by erykcoapl
from typing import Iterable
def except_zero(items: list) -> Iterable:
srt = sorted(filter(None, items), reverse=True)
return (it and srt.pop() for it in items)
March 22, 2021
Comments: