Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def p():
- #print the value of value1
- print(p.__dict__.get('value1',0))
- def q():
- #increase the value of value1 +1
- p.value1 = getattr(p,'value1',0) + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement