def calc_answer(question, solution):
    """
    Calculate the black and white pegs of a question
    @param question: The question that is asked
    @param solution: The secret solution
    @return: black, white pegs
    """
    q = question.lst()
    s = solution.lst()
    r = []
    b = w = 0
    for i in range(len(q)):
        if q[i] == s[i]:
            b += 1
            r.append(i)
    for d in reversed(r):
        del q[d]
        del s[d]
    for i in range(len(q)):
        for j in range(len(s)):
            if q[i] == s[j]:
                w += 1
                del s[j]
                break
    return b, w