You have two arguments: ```string``` - a string of random letters(only lowercase) and ```array``` - an array of strings(feelings). Your task is to return how many specific feelings are in the ```array```. 

For example: 

```
string -> 'yliausoenvjw'
array -> ['anger', 'awe', 'joy', 'love', 'grief']
output -> '3 feelings.' // 'awe', 'joy', 'love'


string -> 'griefgriefgrief'
array -> ['anger', 'awe', 'joy', 'love', 'grief']
output -> '1 feeling.' // 'grief'


string -> 'abcdkasdfvkadf'
array -> ['desire', 'joy', 'shame', 'longing', 'fear']
output -> '0 feelings.'
```

If the feeling can be formed once - plus one to the answer.

If the feeling can be formed several times from different letters - plus one to the answer.

Eeach letter in ```string``` participates in the formation of all feelings. 'angerw' -> 2 feelings: 'anger' and 'awe'.

Source: codewars | Difficulty: EASY
Tags: String algorithms

Fundamentals

Starter code: def count_feelings(s, arr):
	

Solutions:
from collections import Counter

def count_feelings(s, arr):
	total = sum((Counter(s) & Counter(w) == Counter(w) for w in arr))
	return '%s feeling%s.' % (total, '' if total == 1 else 's')


from collections import Counter

def count_feelings(stg, lst):
	letters = Counter(stg)
	count = sum((1 for feeling in lst if not Counter(feeling) - letters))
	return f"{count} feeling{('s' if count != 1 else '')}."


def count_feelings(s, arr):
	return next((f"{x} feeling{['s', ''][x == 1]}." for x in [sum((all((s.count(c) >= x.count(c) for c in x)) for x in arr))]))


from collections import Counter

def count_feelings(s, arr):
	sc = Counter(s)
	n = sum((all((sc[c] >= x for (c, x) in Counter(feeling).items())) for feeling in arr))
	return f"{n} feeling{('' if n == 1 else 's')}."


from collections import Counter

def count_feelings(s, arr):
	count = sum((1 for f in arr if not Counter(f) - Counter(s)))
	return '{} feeling{}.'.format(count, '' if count == 1 else 's')


def count_feelings(s, arr):
	count = sum([all([char in s and s.count(char) >= f.count(char) for char in f]) for f in arr])
	return '{count} {tense}.'.format(count=count, tense='feeling' if count == 1 else 'feelings')


def count_feelings(s, arr):
	c = 0
	for i in arr:
		r = True
		for j in i:
			if j not in s or i.count(j) > s.count(j):
				r = False
		if r:
			c += 1
	return str(c) + ' feelings.' if c != 1 else str(c) + ' feeling.'


from collections import Counter

def count_feelings(s, arr):
	count = sum([1 for word in arr if len(Counter(word) - Counter(s)) == 0])
	return '{} feeling{}.'.format(count, '' if count == 1 else 's')