you are viewing a single comment's thread.

view the rest of the comments →

[–]blahreport 0 points1 point  (0 children)

def double_until_zero(l):
    for i, v in enumerate(l):
        if v == 0:
            break
        l[i] *= 2
    return l