headzoo
public python v1 · immutable#! /usr/bin/env pythonclass myList(list): counter = 0 theList = [] def __init__(self, theItem): self.theList = theItem def mItems(self): n = (self.theList[counter], self.theList[counter + 1]) self.counter = self.counter + 2 return nif __name__ == '__main__': myList = ['headzoo', 'samble'] print myList print myList.mItems()