def get_left_right(seq):
    """
    Find position of the first and last base
    """
    cseq = seq.strip(GAPS)
    leftjust = seq.index(cseq[0])
    rightjust = seq.rindex(cseq[-1])

    return leftjust, rightjust
Find position of the first and last base