human
Can you provide a code to program to check if a number is divisible by any of its digits and the other steps required given the following:
Program to check if a number is divisible by any of its digits | Python implementation of above approach.
Converting integer to string.
Traversing the string.
If the number is divisible by digits then return yes.
If no digits are dividing the number then return no.
Driver Code.
passing this number to get result function"
How can the above be solved in Python?
assistant
#Here is code to program to check if a number is divisible by any of its digits and the other steps required.
 def getResult ( n ) :
	st = str ( n )
	for i in st :
		if ( n % int ( i ) == 0 ) :
			return ' Yes '
	return ' No '
n = 9876543
print ( getResult ( n ) )