I need to write function which takes a count and a string and return a list of all of the words in the string that are count word characters long or longer.
My function is:
import re
def find_words(count, a_str):
count = int(count)
return re.findall(r'\w{},'.format(int(count)), a_str)
But it doesn't work, it is return empty list:
Example:
find_words(4, "dog, cat, baby, balloon, me")
Should return:
['baby', 'balloon']