title: python function will not return value that is based on condition
body: <p>I am new to this, and I am looking for help. I currently am stuck in a program I'm trying to complete. Here it is:</p>
  
  <pre><code>def printStock(stockList, stockPrice, p):
      for i in range(len(stockPrice)):
          if stockPrice[i] &gt; p:
              p = stockList[i]
      print("The stocks with a higher value are:", p) 
  
  def searchStock(stockList, stockPrice, s):
      for i in range(len(stockList)):
          if s == stockList[i]:
              s = stockPrice[i]
          elif s != stockList[i]:
              s = -1
      return s
  
  def mainFun():
      stockList= []
      stockPrice = []
      l = 1
      while l &gt; 0:
          stocks = str(input("Enter the name of the stock:"))
          stockList +=  [stocks]
          if stocks == "done"or stocks == 'done':
              l = l * -1
              stockList.remove("done")
          else:
              price = int(input("Enter the price of the stock:"))
          stockPrice += [price]
          l = l + 1
      print(stockList)
      print(stockPrice)
      s = input("Enter the name of the stock you're looking for:")
      searchStock(stockList, stockPrice, s)
      p = s
      printStock(stockList, stockPrice, p)
  </code></pre>
  
  <p>Every time I run the program to the end, it never returns the variable s for some reason. If i replace return with print, it always prints -1 instead of the stockPrice if its on the list. I also get an error saying "unorderable types int() > str()" regarding line 3. Basically the function printStock takes the three parameters and once the function is done it should print the names of the stocks higher than the value 'p'. The value of 'p' is the same as the value I get after calling searchStock function, but I cant seem to get it to work. Can someone please help me?</p>