All pastes #78082 Raw Edit

headzoo

public python v1 · immutable
·published 2006-07-03 19:30 UTC
rendered paste body
#! /usr/bin/env pythonclass myList(list):    counter = 0    theList = []    def __init__(self, theItem):        list.__init__(self)        self.theList = theItem    def mItems(self):        n = [(self.theList[self.counter], self.theList[self.counter + 1])]        self.counter = self.counter + 2        return nif __name__ == '__main__':    d = myList(['headzoo', 'samble', 'joe', 'jack'])    print [(x,y) for x, y in d.mItems()]