Пример #1
0
 def __init__(self, start=[]):  # extend the 'new' operation
     Stack.__init__(self)  # initialize stack from any sequence
     for str in start:  # start can be another stack too
         self.push(str)
Пример #2
0
 def __init__(self, start=[]):       # extend the 'new' operation
     Stack.__init__(self)            # initialize stack from any sequence
     for str in start:               # start can be another stack too
         self.push(str)