Trying to write a python code to encrypt a string.
Encrypts the string and output is an encrypted string.
print "Enter the string "
a=raw_input()
b=len(a)+1
i=0
e=''
while i<b:
c=''
if i % 3 == 0:
c+=a[i]
e+=chr(ord(c)+5)
del c
elif i%3==1:
c+=a[i]
e+=chr(ord(c)+2)
del c
elif i%3==2:
c+=a[i]
e+=chr(ord(c)+6)
del c
i=i+1
print e
But when on running this script, error comes.
c+=a[i]
IndexError: string index out of range