I would like to know how to increase/increment an attribute of a class.
I have a class called Account which has an attribute: self.code which is initialized at 0 and I want each time that an object is created the attribute increases.
so, for example:
account1=Account()
account2=Account()
account3=Account()
if I do account3.code
I want to have 3 as a result.
Is there a possible way to do so? thank you in advance.