human
Numbers having Unique ( or Distinct ) digits | Function to print unique digit numbers in range from l to r ..
Start traversing the numbers.
Find digits and maintain its hash.
if a digit occurs more than 1 time then break.
num will be 0 only when above loop doesn 't get  break that means the  number is unique so  print it..
Driver code"
How can the above be solved in Python?
 Give me a code to numbers having Unique ( or Distinct ) digits and the other steps required?
assistant
#Here is code to numbers having Unique ( or Distinct ) digits and the other steps required.
 def printUnique ( l , r ) :
	for i in range ( l , r + 1 ) :
		num = i ;
		visited = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ;
		while ( num ) :
			if visited [ num % 10 ] == 1 :
				break ;
			visited [ num % 10 ] = 1 ;
			num = ( int ) ( num / 10 ) ;
		if num == 0 :
			print ( i , end = " ▁ " ) ;
l = 1 ;
r = 20 ;
printUnique ( l , r ) ;