<gh_stars>0
import random 

alphabet      = input("input your alphabet: ");
alphabet      = alphabet.upper();
choice        = input("input an operation:\n1- auto code alphabet generator\n2- input code alphabet");
code_alphabet = {};
if choice == '1':
    #do somehting
    SYMBOLS = ["'", "°", "^", "=", "+", "-", "*", "/", ">", "<", "!", "#", "Z", "Y", "X", "W", "V", "U", "T", "S", "R", "Q", "P", "O", "N", "M", "L", "K", "J", "I", "H", "G", "F", "E", "D", "C", "B", "A", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
    for letter in alphabet:
        code_alphabet[letter] = 'init';
    
    for letter in alphabet:
        r = random.randint(0,len(SYMBOLS));
        code_alphabet[letter] = SYMBOLS.pop(r);
else:
    for letter in alphabet:
        print("input the letter correspond to: ", format(letter))
        code_alphabet[letter] = input();
print()    
plaintext  = input("input the plaintext please: ");
plaintext  = plaintext.upper();
ciphertext = '';
for letter in plaintext:
    if letter == ' ':
        continue;
    ciphertext += code_alphabet[letter];
print("the cipher text: ", ciphertext);
plaintext = '';
for cipher in ciphertext:
    if cipher == ' ':
        continue;
    for k, v in code_alphabet.items():
        if v == cipher:
            plaintext += k;  
print("the plain  text: ", plaintext); 

