Weaving multiple lists into one I have this code to weave the split_input ['5,4 4,5 8,7', '6,3 3,2 9,6 4,3', '7,6', '9,8', '5,5 7,8 6,5 6,4'] together. However I feel like this can be done more efficient (especially the weave function) but I have no clue how to improve it without importing any modules.

class Class1:
    def __init__(self, row):
        self.row = row

    def append(self, coordinate):
        self.row += [coordinate]

    def extend(self, row):
        for coordinate in row:
            self.row += [coordinate]

    def weave(self, row2):
        result = Class1([])
        for i in range(len(self.row)):
            if i &lt; len(self.row):
                result.append(self.row[i])
            if i &lt; len(row2.row):
                result.append(row2.row[i])
        if len(row2.row) &gt; len(self.row):
            result.extend(row2.row[len(self.row):])
        return result

def get_route(split_input):
    rows = []
    for i in range(len(split_input)):
        rows += [Class1(split_input[i].split())]
    previous_row = rows[0]

    for row in rows[1:]:
        previous_row = previous_row.weave(row)
    return previous_row


woven_rows = get_route(split_input)
print woven_rows


Do you have any good advice?

The output of the code is one list. First, the first and second list are weaved into one list. Then this list is weaved with the third list etc.
I'm not sure what Class1 is for, but you can weave 2 lists together using a list comprehension to build the first part of the list.  Then add on the rest of the longer list.  Like so:

def weave2(seq1, seq2):
    result = [item for pair in zip(seq1, seq2) for item in pair]

    if len(seq1) &lt; len(seq2):
        result += seq2[len(seq1):]
    else:
        result += seq1[len(seq2):]

    return result


To weave more than two lists, weave the first two together, then weave in the third list, and so on.  Like so:

def weave(*args):
    args = iter(args)
    result = next(args)

    for arg in args:
        result = weave2(result, arg)

    return result