human
Print all numbers in given range having digits in strictly increasing order | Function to print all numbers in the range [ L , R ] having digits in strictly increasing order.
Iterate over the range.
Iterate over the digits.
Check if the current digit is >= the previous digit.
If the digits are in ascending order.
Given range L and R.
Function call"
How can the above be solved in Python?
assistant
#Here is code to print all numbers in given range having digits in strictly increasing order and the other steps required.
 def printNum ( L , R ) :
	for i in range ( L , R + 1 ) :
		temp = i
		c = 10
		flag = 0
		while ( temp > 0 ) :
			if ( temp % 10 >= c ) :
				flag = 1
				break
			c = temp % 10
			temp //= 10
		if ( flag == 0 ) :
			print ( i , end = " ▁ " )
L = 10
R = 15
printNum ( L , R )