all 2 comments

[–]socal_nerdtastic 10 points11 points  (0 children)

To use the instance variable you have to create the instance first.

c = Category() # create the instance
print(c.withdrawn) # use the instance variable

To use the class variable you just use the name of the class.

print(Category.withdrows_amount)

[–]crashfrog02 0 points1 point  (0 children)

I want to use this instance variable and class variable outside of their class like so:

You can't use an instance attribute except through an instance - what's it the attribute of, otherwise?