For the love of god, cant understand why does this print the index of 18 for s which it is actually 7...
Would appreciate any help.
Would appreciate any help.
def encrypt_atbash(msg): alphabet = "abcdefghijklmnopqrstuvwxyz" #regular alphabet prior to reverse new_alphabet = "zyxwvutsrqponmlkjihgfedcba" ciphertext = "" #empty tray for uncoded text position = [] for char in msg: old_position = new_alphabet.find(char) print(old_position) new_cd = alphabet[old_position] #ciphertext.append[old_position] ans = encrypt_atbash('hello world')