You are printing separate variables. MemberCounter.members is different from m1.members="Two". Print the id() of each, which will show that they all occupy different memory locations. You might also want to study up on the difference between class objects/attributes and instance objects/attributes Click Here Sometimes you are printing an instance object and sometimes you are printing a class object, which are different variables even though they have the same name. m2 does not have an instance object named "members" so it prints the class object. If you created one
m2.members="Three"
it would print that instead, and
MemberCounter.members will always print the class object.
ganapathy24 commented: Its not a homework u sherlock... I jus forgot my rar password, but i know the words used in it, in order to generate all the possible combination i raised it.... +0
woooee 814 Nearly a Posting Maven
woooee 814 Nearly a Posting Maven
CodingCabbage commented: Thankyou, very helpful +0
TrustyTony commented: clear thinking +12
Gribouillis commented: good help +14