lab5practice

lab5practice - plainText = plainText + evenString[i]...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
def scramble2Decrypt(cipherText): ''' Decrypt the cipherText to the original plainText ''' oddString = cipherText[:len(cipherText)//2] #splice the first half evenString = cipherText[len(cipherText)//2:] #splice the second half plainText = '' for i in range(len(cipherText)//2):
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: plainText = plainText + evenString[i] plainText = plainText + oddString[i] if len(oddString) <= len(evenString): #evenString has one character left plainText = plainText + evenString[-1] return plainText...
View Full Document

Ask a homework question - tutors are online