(ct, key, symbols="ABCDEFGHIJKLMNOPQRSTUVWXYZ")
return "".join([str(A[x]) for x in P])
Decode using the Vigenère cipher.

    Examples
    ========

    >>> from sympy.crypto.crypto import decipher_vigenere
    >>> key = "encrypt"
    >>> ct = "QRGK kt HRZQE BPR"
    >>> decipher_vigenere(ct, key)
    'MEETMEONMONDAY'
Decode using the Vigenère cipher.
Decode using the Vigenère cipher .
def decipher_vigenere(ct, key, symbols="ABCDEFGHIJKLMNOPQRSTUVWXYZ"):
    """
    Decode using the Vigenère cipher.

    Examples
    ========

    >>> from sympy.crypto.crypto import decipher_vigenere
    >>> key = "encrypt"
    >>> ct = "QRGK kt HRZQE BPR"
    >>> decipher_vigenere(ct, key)
    'MEETMEONMONDAY'

    """
    symbols = "".join(symbols)
    A = alphabet_of_cipher(symbols)
    N = len(A)   # normally, 26
    key0 = uniq(key)
    key0 = [x.capitalize() for x in key0 if x.isalnum()]
    K = [A.index(x) for x in key0]
    k = len(K)
    ct0 = [x.capitalize() for x in ct if x.isalnum()]
    C = [A.index(x) for x in ct0]
    n = len(C)
    #m = n//k
    P = [(-K[i % k] + C[i]) % N for i in range(n)]
    return "".join([str(A[x]) for x in P])
def decipher_vigenere ( ct , key , symbols = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) : symbols = "" . join ( symbols ) A = alphabet_of_cipher ( symbols ) N = len ( A ) # normally, 26 key0 = uniq ( key ) key0 = [ x . capitalize ( ) for x in key0 if x . isalnum ( ) ] K = [ A . index ( x ) for x in key0 ] k = len ( K ) ct0 = [ x . capitalize ( ) for x in ct if x . isalnum ( ) ] C = [ A . index ( x ) for x in ct0 ] n = len ( C ) #m = n//k P = [ ( - K [ i % k ] + C [ i ] ) % N for i in range ( n ) ] return "" . join ( [ str ( A [ x ] ) for x in P ] )