If digit at jth position is greater than 0 then substitute 1
if ( digit [ j ] > 0 ) : NEW_LINE INDENT num = num * 10 + 1 NEW_LINE digit [ j ] -= 1 NEW_LINE DEDENT else : NEW_LINE INDENT num *= 10 NEW_LINE DEDENT print ( num , end = " ▁ " ) NEW_LINE