Complete the function that counts the number of unique consonants in a string (made up of printable ascii characters).

Consonants are letters used in English other than `"a", "e", "i", "o", "u"`. We will count `"y"` as a consonant.

Remember, your function needs to return the number of unique consonants - disregarding duplicates. For example, if the string passed into the function reads `"add"`, the function should return `1` rather than `2`, since `"d"` is a duplicate.

Similarly, the function should also disregard duplicate consonants of differing cases. For example, `"Dad"` passed into the function should return `1` as `"d"` and `"D"` are duplicates.

## Examples

```
"add" ==> 1
"Dad" ==> 1
"aeiou" ==> 0
"sillystring" ==> 7
"abcdefghijklmnopqrstuvwxyz" ==> 21
"Count my unique consonants!!" ==> 7
```

Source: codewars | Difficulty: EASY
Tags: String algorithms

Fundamentals

Starter code: def count_consonants(text):
	

Solutions:
CONSONANTS = set('bcdfghjklmnpqrstvwxyz')

def count_consonants(text):
	return len(CONSONANTS.intersection(text.lower()))


def count_consonants(text):
	return len(set(filter(str.isalpha, text.lower())) - set('aeiou'))


def count_consonants(s):
	return len({c for c in s.lower() if c in 'bcdfghjklmnpqrstvwxyz'})


count_consonants = lambda s: len(set((l for l in s.lower() if l in 'bcdfghjklmnpqrstvwxyz')))


def count_consonants(text):
	return len({ch for ch in text.lower() if ch in 'bcdfghjklmnpqrstvwxyz'})


def count_consonants(text):
	return len(set((c for c in text.lower() if c in 'bcdfghjklmnpqrstvwxxyz')))


def count_consonants(text):
	return len(set(list(text.lower())).intersection(set(list('bcdfghjklmnpqrstvwxyz'))))


def count_consonants(text):
	vowels = ['a', 'e', 'i', 'o', 'u']
	consonants = []
	for letter in text:
		letter = letter.lower()
		conditions = [letter not in vowels, letter not in consonants, letter.isalpha()]
		if all(conditions):
			consonants.append(letter)
	return len(consonants)