title: Google Foobar Test Case Failing
body: <p>I'm completing a google foobar challenge, but for the life of me, I can't pass the 4th test case, here is the challenge:</p>
  
  <p>You need to figure out which sets of panels in any given array you can take offline to repair while still maintaining the maximum amount of power output per array, and to do THAT, you'll first need to figure out what the maximum output of each array actually is. Write a function answer(xs) that takes a list of integers representing the power output levels of each panel in an array, and returns the maximum product of some non-empty subset of those numbers. So for example, if an array contained panels with power output levels of [2, -3, 1, 0, -5], then the maximum product would be found by taking the subset: </p>
  
  <p><code>xs[0] = 2, xs[1] = -3, xs[4] = -5, giving the product 2*(-3)*(-5) = 30.  So answer([2,-3,1,0,-5]) will be "30".</code></p>
  
  <p>Each array of solar panels contains at least 1 and no more than 50 panels, and each panel will have a power output level whose absolute value is no greater than 1000 (some panels are malfunctioning so badly that they're draining energy, but you know a trick with the panels' wave stabilizer that lets you combine two negative-output panels to produce the positive output of the multiple of their power values). The final products may be very large, so give the answer as a string representation of the number.</p>
  
  <p>Here are some given test cases:</p>
  
  <h1>Test cases</h1>
  
  <pre><code>Inputs:
      (int list) xs = [2, 0, 2, 2, 0]
  Output:
      (string) "8"
  
  Inputs:
      (int list) xs = [-2, -3, 4, -5]
  Output:
      (string) "60"
  </code></pre>
  
  <p>And here is my code:</p>
  
  <pre><code>def product_of_values(lst):
      product = 1
      if len(lst) &gt; 0:
          for x in lst:
              product *= x
      return product
  
  
  
  
  def answer(xs):
      # two seperate list for positive and negative values
      positive_list = [x for x in xs if x &gt; 0]
      negative_list = [x for x in xs if x &lt; 0]
      pos_product = product_of_values(pos_list)
  
  # multiplication of an even number of negatives == positive value
  if len(negative_list) % 2 == 0:
      negative_product = product_of_values(negative_list)
  
  # if length of negative_list is odd, pop value closest to zero
  else:
      neg_list.remove(max(neg_list))
      neg_product = product_of_values(neg_list)
  
  # If there is only one negative value in the negative_list, return 0.
  if len(pos_list) &lt; 1 and len(neg_list) &lt;= 1:
      return '0'
  else:
      return str(neg_product * pos_product)
  </code></pre>
  
  <p>am I missing something obvious?</p>