how do I write a method to calculate the length of the stack? How do I use the len() for it?
I have written
def len_of(self):
x= len(self.items)
return x
is there something wrong with it syntactically? Can i write it any better? the use of the the inbuilt function len() is what I am concerned about