Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
one line, for in for solution in Clear category for Duplicate Zeros by kdim
def duplicate_zeros(donuts: list) -> list:
return [x for x in donuts for _ in range((x == 0) + 1)]
Sept. 24, 2022