def encode(expression):
    """Takes a mathmatic expression as a string and returns a chromosome."""
    output = []
    for char in expression:
        if char in traits.keys():
            output.append(traits[char])
    return output
Takes a mathmatic expression as a string and returns a chromosome.
recipes/Python/498257_Simple_functibase_Genetic/recipe-498257.py