title: substring not found error
body: <p>I have to replace every character with the character after it by two in the alphapet. For example <code>g</code> to <code>i</code> and <code>a</code> to <code>c</code>. I always get this error while i was making the program to solve it</p>
  
  <pre><code>substring not found
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>string="g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj."
  #=========this is the string on the site
  alphapet="abcdefghijklmnopqrstuvwxyz"
  #this is the alphapet ofcourse
  x=""
  y=0
  z=""
  m=0
  #that was declaring variables
  #the following is a loop which would go through string
  for i in string:
      #the if statement should check if i was in alphapet string
      if i in alphapet:
          if i=="y":
              string.replace(i,"a")
          elif i=="z":
              string.replace(i,"b")
           #the previous two conditions were special cases
          else:
              #the x will equal the first character as m =0 which is"g"
              x=string[m]
              #the y should equal the index of the character in alphapet this is were the error comes
              y=alphapet.index(x)
              #the z should equal the letter that comes after it by 2 in alphapet
              z=alphapet[y+2]
              #the following line should replace it
              string.replace(i,z)
              m+=1
  print(string)
  </code></pre>