Counting consonants and vowels I'm new to Python and want to develop good habits at the beginning. This class takes a string, and then counts the number of vowels and consonants in the word(s).  Any advice on how to improve? 

class CntVowels:

    def __init__(self,string):
        self.string = string
        self.vowels = [ "a", "e", "i", "o", "u"]

    def vowel_count(self):
        strings = self.string.lower()
        vowels = self.vowels

        counter = 0
        for letter in strings:
            for vowel in vowels:
                if letter == vowel:
                    counter += 1
        print("There are {} vowels in this string.".format(counter))

    def constant_count(self):
        strings = self.string.lower()
        vowels = self.vowels
        length = len(strings)
        counter = 0
        for letter in self.string:
            for vowel in vowels:
                if letter == vowel:
                    counter += 1

        results = length - counter
        print("There are {} constants in this string.".format(results))



a = input("enter a string")

CntVowels(a).vowel_count()

CntVowels(a).constant_count()
Welcome to Python, and welcome to Code Review.

Classes

An instance of a class, where only one method is ever called, is not a good class.  Instead, use functions.

a = input("Enter a string: ")
vowel_count(a)
constant_count(a)


Class Constants &amp; Members

If you do create a class, and that class has some global constant data, store that on the class itself, not on the instances of the class.

Constants should have UPPERCASE_NAMES, to distinguish them from non-constant data.  Moreover, if the data is constant, where possible use non-mutable objects, such as tuple (eg, (..., ..., ...)) over list (eg, [..., ..., ...]).

Non-public members of a class should begin with a single underscore.

class CntVowels:

    VOWELS = ("a", "e", "i", "o", "u")

    def __init__(self, string):
        self._string = string

    # ...


Eschew .lower()

When attempting to compare strings (or characters) case-insensitively, use .casefold() instead of .lower().  This properly handles many additional oddities, such as the German ß which is equivalent to ss.

x in y

Testing for existence of an item in a container is easily done with the in operator.  For example, this code:

for vowel in vowels:
    if letter == vowel:
        counter += 1


can be re-written more efficiently as:

if letter in vowels:
    count += 1


A String is a Container

It could even be re-written as:

if letter in "aeiou":
    count += 1


since a string is simply a container of letters.

Non-Vowels are not necessarily Consonants

Many characters which are not vowels are also not consonants, such as 4, &amp;,  and . to name a few.

Avoid Name Shadowing

string is not a good variable name, because a module named string exists, and can be imported, and doing so results in the meaning of string changing depending on what is in scope.

It is even reasonable that you’d import string in this program, to get convenient access to all of the string.ascii_lowercase letters.