Hi, I just need clarification on these two terms.
I’ve been told that these two are similar to each other and these terms can be used interchangeably, while the other side presented to me that there are differences between them, so to me, it seems like the more I read about these, the more I get confused because there are different interpretations to the same concepts.
class Car: def __init__(self, color, style): self.color = color self.style = style my_car = Car("Black", "Sedan")
So I know that
Car is a class, but does it mean that the contents of
Car have a group of
objects? Like, is this whole thing an object?
def __init__(self, color, style): self.color = color self.style = style
self_style an instance?
It also seems like
my_car is an object because as far as I know, we create an object by calling the class and passing in arguments, but then, is the object not already part of the class??
What do I call the contents of the class, because it has properties, attributes and all that stuff. Do I just look at it as
a class with a group of objects? And for
my_car not an instance? Can I refer to it as an object or instance or can I use them interchangeably without worrying too much about the way I refer it as?
I’m so confused…