title: Python Squares Function
body: <p>I'm writing a function that will return a list of square numbers but will return an empty list if the function takes the parameter ('apple') or (range(10)) or a list. I have the first part done but can't figure out how to return the empty set if the parameter n is not an integer- I keep getting an error: unorderable types: str() > int()
  I understand that a string can't be compared to an integer but I need it to return the empty list.</p>
  
  <pre><code>def square(n):
  
      return n**2
  
  def Squares(n):
  
      if n&gt;0:
          mapResult=map(square,range(1,n+1))
          squareList=(list(mapResult))   
      else:
          squareList=[]
  
      return squareList
  </code></pre>