I have this program:
If i put in cabbage.x.h, it returns
3
I want to remove the need to type cabbage in this,so i can just put
x.h and return
3.
Any help is appreciated
Thanks
Code:
class Cabbage:
def __init__(self, height, bobnum):
self.h = self.height
self.b = self.bobnum
x = cabbage(3, 7)
3
I want to remove the need to type cabbage in this,so i can just put
x.h and return
3.
Any help is appreciated
Thanks
Comment