maths.remove_digit

Functions

remove_digit(→ int)

returns the biggest possible result

Module Contents

maths.remove_digit.remove_digit(num: int) int

returns the biggest possible result that can be achieved by removing one digit from the given number

>>> remove_digit(152)
52
>>> remove_digit(6385)
685
>>> remove_digit(-11)
1
>>> remove_digit(2222222)
222222
>>> remove_digit("2222222")
Traceback (most recent call last):
TypeError: only integers accepted as input
>>> remove_digit("string input")
Traceback (most recent call last):
TypeError: only integers accepted as input