jtentor

DemoQueue4 - SpecialQueue.py

May 18th, 2020
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3. __author__ = 'Julio Tentor <jtentor@fi.unju.edu.ar>'
  4.  
  5.  
  6. from _collections import deque
  7.  
  8.  
  9. class SpecialQueue(deque):
  10.     def join(self, other):
  11.         result = SpecialQueue()
  12.         for e in self:
  13.             result.append(e)
  14.         for e in other:
  15.             result.append(e)
  16.         return result
  17.  
  18.  
  19. if __name__ == "__main__":
  20.     pass
Add Comment
Please, Sign In to add comment