Posts Tagged ‘regex’

Regular expression parsing in Python

July 15th, 2009

Need to fill this in…

Some code:

class Bag:
    def __init__(self):
        self.data = []
    def add(self, x):
        self.data.append(x)
    def addtwice(self, x):
        self.add(x)
        self.add(x)