def find_motif_positions(sequence: str, motif: str):
    """
    Returns the start and end position(s) of a core motif in a sequence

    Args:
        sequence: string of nucleotides
        motif: string of nucleotides representing a motif

    Returns:
        startpositions: list of start position(s) of core motif in read
        endpositions: list of end position(s) of core motif in read
    """
    startpositions = []
    for i in range(len(sequence) - len(motif) + 1):  # loop over read
        match = True
        for j in enumerate(motif):  # loop over characters
            if sequence[i + j[0]] != motif[j[0]]:  # compare characters
                match = False   # mismatch
                break
        if match:   # all chars matched
            startpositions.append(i)
    endpositions = []
    for k in enumerate(startpositions):
        endpositions.append(startpositions[k[0]] + len(motif) - 1)
    return startpositions, endpositions