def complememt(dna) :
    """
    This function returns the reverse complement of a DNA sequence string

    dna is the dna sequence to be translated. Assumes already in lower case
    """
    basecomplement={'a':'t','c':'g','g':'c','t':'a','n':'n'}
    letters = list(dna[::-1])   #blow the string backwards into a letters list
    letters = [basecomplement[base] for base in letters]  #convert all
    return ''.join(letters)     #turn letters back to string