My solution. Open to recommendations.
def count_divisible_number(n,m): x_list = [] divisible = [] returnable = [] for digit in str(abs(n)): x_list.append(int(digit)) print (x_list) #Converted the digits into a tuple :-) #for each element of x_list, divide (%) it by m. If there are no remainders, then add element to divisible. for value in x_list: if m == 0: return 0 elif value % m == 0: divisible.append(value) print(divisible) print(len(divisible))