Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
res.insert(i, 0) solution in Clear category for Sort Except Zero by flpo
def except_zero(items):
res = sorted(i for i in items if i)
for i, x in enumerate(items):
if not x: res.insert(i, 0)
return res
Jan. 12, 2020
Comments: