Write a program that outputs the `n` largest elements from a list.

Example:
```python
largest(2, [7,6,5,4,3,2,1])
# => [6,7]
```

Difficulty: introductory

Starter code:

def largest(n,xs):
	

Solutions:
def largest(n, xs):
  "Find the n highest elements in a list"
  
  return sorted(xs)[-n:];

def largest(n,xs):
  import heapq
  return heapq.nlargest(n,xs)[::-1]

def largest(n,xs):
  xs.sort()
  return xs[-n:]

def largest(n,xs):
  list = sorted(xs)
  return list[-n:]

import heapq

def largest(n,xs):
  """Find the n highest elements in a list"""
  return sorted(heapq.nlargest(n, xs))

largest = lambda n,x: sorted(x)[-n:]

largest=lambda n,a:a.sort()or a[-n:]

def largest(n,xs):
    lst = sorted(xs)
    new = []
    for i in range(n):
        new.append(lst[-i-1])
    return sorted(new)


def largest(n,xs):
    v=sorted(xs)
    return v[-n:]

def largest(n,xs):
  """Find the n highest elements in a list"""
  return (sorted(xs, reverse=True)[0:n])[::-1]