constructor python variables

class DemoClass:
    num = 101 # default value of self.num when read_number method called

    # parameterized constructor
    def __init__(self, data):
        self.num = data

    # a method
    def read_number(self):
        print(self.num)

Here is what the above code is Doing:
1. We created a class named DemoClass.
2. We created a variable named num and assigned a value to it.
3. We created a constructor with a parameter named data.
4. We assigned the value of data to the num variable.
5. We created a method named read_number.
6. We printed the value of num.