Letter1,Letter2,Letter3,Letter4,Letter5,Letter6,Letter7,Letter8,Letter9,Letter10,Letter11,Letter12=[''],[''],[''],[''],[''],[''],[''],[''],[''],[''],[''],['']
def encoder():
print "Welcome to the encoder"
[Letter1.append(str(ord(c)-96)) for c in raw_input ("Please input the first letter of the word: ")]
[Letter2.append(str(ord(c)-96)) for c in raw_input ("Please input the second letter of the word: ")]
[Letter3.append(str(ord(c)-96)) for c in raw_input ("Please input the third letter of the word: ")]
[Letter4.append(str(ord(c)-96)) for c in raw_input ("Please input the fourth letter of the word: ")]
[Letter5.append(str(ord(c)-96)) for c in raw_input ("Please input the fifth letter of the word: ")]
[Letter6.append(str(ord(c)-96)) for c in raw_input ("Please input the sixth letter of the word: ")]
[Letter7.append(str(ord(c)-96)) for c in raw_input ("Please input the seventh letter of the word: ")]
[Letter8.append(str(ord(c)-96)) for c in raw_input ("Please input the eighth letter of the word: ")]
[Letter9.append(str(ord(c)-96)) for c in raw_input ("Please input the ninth letter of the word: ")]
[Letter10.append(str(ord(c)-96)) for c in raw_input ("Please input the tenth letter of the word: ")]
[Letter11.append(str(ord(c)-96)) for c in raw_input ("Please input the eleventh letter of the word: ")]
[Letter12.append(str(ord(c)-96)) for c in raw_input ("Please input the twelvth letter of the word: ")]
print "Your code is " + ''.join(Letter3) + ''.join(Letter2) + ''.join(Letter1) + ''.join(Letter6) + ''.join(Letter5) + ''.join(Letter4) + ''.join(Letter9) + ''.join(Letter8) + ''.join(Letter7) + ''.join(Letter12) + ''.join(Letter11) + ''.join(Letter10)
def decoder():
Letter112 = [chr(int(c)+96) for c in Letter1[1:]]
Letter21 = [chr(int(c)+96) for c in Letter2[1:]]
Letter31 = [chr(int(c)+96) for c in Letter3[1:]]
Letter41 = [chr(int(c)+96) for c in Letter4[1:]]
Letter51 = [chr(int(c)+96) for c in Letter5[1:]]
Letter61 = [chr(int(c)+96) for c in Letter6[1:]]
Letter71 = [chr(int(c)+96) for c in Letter7[1:]]
Letter81 = [chr(int(c)+96) for c in Letter8[1:]]
Letter91 = [chr(int(c)+96) for c in Letter9[1:]]
Letter101 = [chr(int(c)+96) for c in Letter10[1:]]
Letter111 = [chr(int(c)+96) for c in Letter11[1:]]
Letter121 = [chr(int(c)+96) for c in Letter12[1:]]
print "Your code is " + ''.join(Letter31) + ''.join(Letter21) + ''.join(Letter112) + ''.join(Letter61) + ''.join(Letter51) + ''.join(Letter41) + ''.join(Letter91) + ''.join(Letter81) + ''.join(Letter71) + ''.join(Letter121) + ''.join(Letter111) + ''.join(Letter101)
encoder()
decoder()
Output:
Welcome to the encoder
Please input the first letter of the word: asdf
Please input the second letter of the word: b
Please input the third letter of the word: g
Please input the fourth letter of the word: r
Please input the fifth letter of the word: d
Please input the sixth letter of the word: w
Please input the seventh letter of the word: r
Please input the eighth letter of the word: c
Please input the ninth letter of the word: g
Please input the tenth letter of the word: d
Please input the eleventh letter of the word: s
Please input the twelvth letter of the word: c
Your code is 72119462341873183194
Your code is gbasdfwdrgcrcsd