def evaluateSystem(axiom, rules, n):
    """Evaluates a regular bog-standard L-System.
    
    axiom is a sequence of symbols.
    rules is either:
        a dictionary type S->Symbols, like {1: [1, 2, 3]}
        a list of tuples as the ones produced by the function production()
        a single tuple as the ones produced by the function production()
    n is an integer specifying the number of iterations
    
    What data constitutes as a symbol is not really important, but it should
    support equality and hashing.
    
    Example for the simple Pythagoras tree fractal:
        
        >>> evaluateSystem("0", {"1":list("11"),"0":list("1[0]0")}, 2)
        ['1', '1', '[', '1', '[', '0', ']', '0', ']', '1', '[', '0', ']', '0']

    A cleaner version using production():
        
        >>> evaluateSystem("0", production("1->11", "0->1[0]0"), 2)
        ['1', '1', '[', '1', '[', '0', ']', '0', ']', '1', '[', '0', ']', '0']
    """
    if issubclass(type(rules), list):
        rules = dict(rules)
    if issubclass(type(rules), tuple):
        rules = [rules]
    if n < 1:
        return axiom
    result = []
    for x in axiom:
        if x in rules:
            result += rules[x]
        else:
            result.append(x)
    return evaluateSystem(result, rules, n-1)