Hay Job done.
Just had to rush this one for you. I have too much on me but i hope you will be happy with this. Well a litle upvoting will be great
:)
alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
crypalph = []
ROT13 = 13
for x in range(0,52):
crypalph.append(alphabet[(x + ROT13) % 52])
#----------------------------------------------------------------Ask user input
user_input = raw_input ("Please enter some text: \t").strip() # Clean the input
#-----------------------------------------------------Define blank cryptmessage
encryptmessage =''
sub=len(user_input) # Get the lenght tou use for slice
#------------------------------------------------------------Encrypt user input
for x in user_input:
if x in alphabet:
encryptmessage += crypalph[alphabet.index(x)]
else:
encryptmessage += x
#------------------------------------------------------------------------------
print "__________________________________________"
print "\nEncrypted message: \t\t" + encryptmessage
print "__________________________________________"
raw_input ("\nPress [Enter] to decode '" + encryptmessage + "'")
#----------------------------------------------------------Define blank message
message =''
#-----------------------------------------------------------Decrypt the message
for x in encryptmessage:
if x in alphabet:
user_input += crypalph[alphabet.index(x)]
else:
user_input += x
#------------------------------------------------------------------------------
fx=[] # New list to Help Take the eccess data.
for w in user_input: # Run Through to get each data
for z in w: # This step could be done oneliner But i thought you may want to
fx.append(z) # Now how everything works better
user_input=fx[:-sub] #<-- This is were you slice the excess
user_input="".join(user_input) #<-- Join stuff for out put
print "__________________________________________"
print "\nDecrypted message: \t\t" + user_input + '\n'
raw_input ("\n\nPress [Enter] to continue")
#OUT PUT
Please enter some text: Richie the King
__________________________________________
Encrypted message: evpuvr Gur XvAt
__________________________________________
Press [Enter] to decode 'evpuvr Gur XvAt'
__________________________________________
Decrypted message: …