title: Using a while loop over lists in Python
body: <p>So I have a need to have a while loop that runs so long as the maximum value from list1 is greater than the minimum value from list2. Right now, I have this: </p>
  
  <pre><code>    count=0
      list1= mine
      list2= friend
      while max(list1)&gt;min(list2):
          count+=1
          list1= list1.remove(max(list1))
          list2= list2.remove(min(list2))
      return count
  </code></pre>
  
  <p>However, the function cannot be called because it says the object is non-iterable. Can someone please tell me how to fix this?</p>
  
  <p>Thank you so very much </p>