human
Total numbers with no repeated digits in a range | Function to check if the given number has repeated digit or not.
Traversing through each digit.
if the digit is present more than once in the number.
return 0 if the number has repeated digit.
return 1 if the number has no repeated digit.
Function to find total number in the given range which has no repeated digit.
Traversing through the range.
Add 1 to the answer if i has no repeated digit else 0.
Driver 's Code .
Calling the calculate"
How can the above be solved in Python?

Give me a code to total numbers with no repeated digits in a range and the other steps required?
assistant
#Here is code to total numbers with no repeated digits in a range and the other steps required.
 def repeated_digit ( n ) :
	a = [ ]
	while n != 0 :
		d = n % 10
		if d in a :
			return 0
		a . append ( d )
		n = n // 10
	return 1
def calculate ( L , R ) :
	answer = 0
	for i in range ( L , R + 1 ) :
		answer = answer + repeated_digit ( i )
	return answer
L = 1
R = 100
print ( calculate ( L , R ) )