Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Takewhile from itertools solution in Creative category for Beginning Zeros by Adrian_Sanz_Wallace
from itertools import takewhile
def beginning_zeros(num: int) -> int:
return len([i for i in takewhile(lambda i: i == '0', str(num))])
March 17, 2021