Question: 
Write a function to find the occurrences of n most common words in a given text.


Model's Code:
def n_common_words(text, n):
    from collections import Counter
    words = text.split()
    return Counter(words).most_common(n)



Sample Correct Code:
from collections import Counter
import re
def n_common_words(text,n):
  words = re.findall('\w+',text)
  n_common_words= Counter(words).most_common(n)
  return list(n_common_words)


Asserts:
assert n_common_words("python is a programming language",1)==[('python', 1)]
assert n_common_words("python is a programming language",1)==[('python', 1)]
assert n_common_words("python is a programming language",5)==[('python', 1),('is', 1), ('a', 1), ('programming', 1), ('language', 1)]


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 862 of 974: 662/862 (76.79814385150812%): success