You must write a program that takes an encrypted string and decrypt it according to specific rules and then print it out. Decryption will occur by performing two operations.
Sample Input Argument 1 (the encrypted string)
Swap the first half of the string with the second half, which should leave you with:
Swap every two characters with each other such as swapping character 1 with 2, 3 with 4, etc., which should leave you with the decrypted string:
Input Argument 1 will contain only uppercase letters
Input Argument 1's length will be between 2 and 100 characters
Input Argument 1's length will always be an even number
Preferably the input will be taken from the command line (like below).
Another Test Case
MPORQTSVUXWZYBADCFEHGJILKNis the input, Output is
import sys _,a=sys.argv b=len(a)//2 s=a[b:]+a[:b] print(''.join(x+y for x,y in zip(s[1::2],s[::2])))