Python solution 🐍
def eradicate(value: int) -> int: value_as_str = str(value) is_zero = value_as_str == "0" return 0 if is_zero else int(value_as_str.strip("0"))
We're a place where coders share, stay up-to-date and grow their careers.
Python solution 🐍