Posted By

mladoux on 03/18/14


Tagged


Versions (?)

Dlist Class


 / Published in: Python
 

Python 3 Homework

  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3.  
  4. ''' Dlist Class '''
  5. class Dlist(list):
  6.  
  7. ''' Initialize List '''
  8. def __init__(iterable=()):
  9.  
  10. super().__init__(iterable)
  11.  
  12. ''' Append to list * 2 '''
  13. def append(self, item):
  14.  
  15. super().append(item * 2)

Report this snippet  

You need to login to post a comment.