title: How to create a function in Python that receives a list of numbers and return the sum of the two largest numbers in that array?
body: <p>I came up with something like this:</p>
  <pre><code>def sumLargestNumbers (x):
      for largest_integer in x:
          largest_integer = max(sumLargestNumbers)
          integers.remove(largest_integer)
      return (sum(largest_integer, integers.remove))
  </code></pre>
  <p>But it gives me this error:</p>
  <pre class="lang-none prettyprint-override"><code>TypeError                                 Traceback (most recent call last) 
    &lt;ipython-input-15-2b77832140c8&gt; in &lt;module&gt;
        1 x = [1, 10]
  ----&gt; 2 print(sumLargestNumbers([1, 10]))
  
    &lt;ipython-input-14-b3557ee34db3&gt; in sumLargestNumbers(x)
        1 def sumLargestNumbers (x):
        2     for largest_integer in x:
  ----&gt; 3         largest_integer = max(sumLargestNumbers)
        4         integers.remove(largest_integer)
        5     return (sum(largest_integer, integers.remove))
  
  TypeError: 'function' object is not iterable
  </code></pre>
  <p>Any help please?</p>