On Jul 11, 2008, at 7:54 PM, Christopher Spears wrote:
For another Core Python Programming question, I created a stack
class. I then put the class into a script to test it:
I understand that this is an exercise; but I think it might be
interesting for you to also look at collections.deque
"Christopher Spears" <[EMAIL PROTECTED]> wrote
I created a stack class. I then put the class into a script to test
it:
I'll assume the crazy indentation is due to email errors.
class Stack(list):
def isempty(self):
length = len(self)
if length == 0:
return True
else:
For another Core Python Programming question, I created a stack class. I then
put the class into a script to test it:
#!/usr/bin/python
class Stack(list):
def isempty(self):
length = len(self)
if length == 0:
return True
else:
return False