(key)
return M
r"""
    5x5 Polybius square.

    Produce the Polybius square for the `5 \times 5` Bifid cipher.

    Examples
    ========

    >>> from sympy.crypto.crypto import bifid5_square
    >>> bifid5_square("gold bug")
    Matrix([
    [G, O, L, D, B],
    [U, A, C, E, F],
    [H, I, K, M, N],
    [P, Q, R, S, T],
    [V, W, X, Y, Z]])
r"""
    5x5 Polybius square.
r 5x5 Polybius square .
def bifid5_square(key):
    r"""
    5x5 Polybius square.

    Produce the Polybius square for the `5 \times 5` Bifid cipher.

    Examples
    ========

    >>> from sympy.crypto.crypto import bifid5_square
    >>> bifid5_square("gold bug")
    Matrix([
    [G, O, L, D, B],
    [U, A, C, E, F],
    [H, I, K, M, N],
    [P, Q, R, S, T],
    [V, W, X, Y, Z]])

    """
    A = alphabet_of_cipher()
    # first make sure the letters are capitalized
    # and key has no spaces or duplicates
    key = uniq(key)
    key0 = [x.capitalize() for x in key if x.isalnum()]
    # create long key
    long_key = key0 + [x for x in A if (not(x in key0) and x != "J")]
    f = lambda i, j: Symbol(long_key[5*i + j])
    M = Matrix(5, 5, f)
    return M
def bifid5_square ( key ) : A = alphabet_of_cipher ( ) # first make sure the letters are capitalized # and key has no spaces or duplicates key = uniq ( key ) key0 = [ x . capitalize ( ) for x in key if x . isalnum ( ) ] # create long key long_key = key0 + [ x for x in A if ( not ( x in key0 ) and x != "J" ) ] f = lambda i , j : Symbol ( long_key [ 5 * i + j ] ) M = Matrix ( 5 , 5 , f ) return M