import random


def single_point_crossover(dna1, dna2):
    """crossover dna1 and dna2 at a random index"""
    pos = int(random.random() * (len(dna1)))
    return (dna1[:pos] + dna2[pos:], dna2[:pos] + dna1[pos:])