When running my code, I get a "substring not found" not entirely sure what that means..here is my code:\
filename = open('code.txt','r').read()
string = filename
def decode(string):
abc='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n=1
result=''
for rotate in string:
result+=abc[(abc.index(rotate)-n)%26]
n+=1
print result
def main():
decode(string)
main()