human
Print all perfect squares from the given range | Function to print all the perfect squares from the given range.
For every element from the range.
If current element is a perfect square.
Driver code"
How can the above be solved in Python?

=====
Write me a code to print all perfect squares from the given range and the other steps required?
assistant
#Here is code to print all perfect squares from the given range and the other steps required.
 def perfectSquares ( l , r ) :
	for i in range ( l , r + 1 ) :
		if ( i ** ( .5 ) == int ( i ** ( .5 ) ) ) :
			print ( i , end = " ▁ " )
l = 2
r = 24
perfectSquares ( l , r )