Drawing fractals with Turtle So, I have my code here:

import turtle

class fractal:

    """A class containing methods that will replicate
    various fractals.

    Attributes:
        num: An integer representing the number of iterations
        t: A turtle graphics object imported from Turtle.py
    """

    def __init__(self, num, t=turtle.Turtle()):
        self.num = num
        self.t = t

    def kochCurve(self):
        axiom = 'F'
        for _ in range(self.num):
            linSys = 'F+F--F+F'
            axiom = axiom.replace('F',linSys)
        for i in axiom:
            if i == 'F':
                self.t.forward(10)
            elif i == '+':
                self.t.left(60)
            elif i == '-':
                self.t.right(60)

    def kochIsland(self):
        axiom = 'F-F-F-F'
        for _ in range(self.num):
            linSys = 'F+FF-FF-F-F+F+F'
            axiom = axiom.replace('F',linSys)
        for i in axiom:
            if i == 'F':
                self.t.forward(10)
            elif i == '+':
                self.t.left(90)
            elif i == '-':
                self.t.right(90)

    def tree(self):
        axiom = '[X]'
        for _ in range(self.num):
            linSys = 'F-[[X]+X]+F[+FX]-X'
            axiom = axiom.replace('X',linSys)
            axiom = axiom.replace('F','FF')

        self.t.setheading(90)
        self.t.setposition(0,-300)
        stack = []
        for i in axiom:
            if i == 'F':
                self.t.forward(10)
            elif i == '+':
                self.t.right(25)
            elif i == '-':
                self.t.left(25)
            elif i == '[':
                pos = self.t.position()
                head = self.t.heading()
                stack.append((pos,head))
            elif i == ']':
                (pos,head) = stack.pop()
                self.t.penup()
                self.t.setposition(pos)
                self.t.setheading(head)
                self.t.pendown()

fractal(3).kochCurve()


Overall, the code just seems a bit redundant and LONG. I'm creating this class to share on a repository for some others to view. However, I don't particularly enjoy the way it looks.

Essentially, this class makes a turtle from Turtle Graphics and draws fractals with it. So far, I have the three different fractals. All that's needed to call into the object is an integer that will be the number of iterations. 

What improvements can I make here?
For each shape, you have this kind of code to generate the movement "recipe":

axiom = ...
for _ in range(self.num):
    replacement = 'some fixed string'
    axiom = axiom.replace(pattern, replacement)
    axiom = axiom.replace(pattern2, replacement2)


This can be generalized with a helper function that takes as parameters axiom and a list of pattern-replacement pairs. All shapes will be able to use this helper and thereby reduce duplication.

The execution of the movement commands is also repetitive. The code for the most complex shape would be able to draw all the simpler​ shapes, with a single parameter of the turn degrees.