An attribute is a variable?

Viewed 35

Suppose I have an object with an attribute, say:

class Monkey:
    def __init__(self, size):
        self.size = size
monkey = Monkey(4)

Then we have an attribute monkey.size. Is this a variable associated with the object 4?

1 Answers
Related