Nonlocal: Difficult
code writing
Write a function that takes in a number, num, and a single digit, digit and removes all instances of digit from num.
def remove_digit(num, digit):
>>> remove_digit(1232142, 2)
1314
reversed, count, final = ______
def helper(n):
______
if n != digit:
______
______
while ______:
last, num = ______
helper(______)
helper(______)
while count > 0:
final = ______
______
______
return final