Python 2.7 我的程序在if/elif/else和won'的长字符串中直接跳转到else;我做不到它的工作

Python 2.7 我的程序在if/elif/else和won'的长字符串中直接跳转到else;我做不到它的工作,python-2.7,if-statement,Python 2.7,If Statement,这是解码脚本的第一段(从某种意义上说,除了3个字符外,它们都是相同的,还有几百个字符),它没有找到合适的字符 #Only one I'll comment, as they are the same except in the converted character. if(str(fin.readline().rstrip('\n')) == "2A"):#If the read string *WITHOUT NEWLINES* is found on the current lin

这是解码脚本的第一段(从某种意义上说,除了3个字符外,它们都是相同的,还有几百个字符),它没有找到合适的字符

#Only one I'll comment, as they are the same except in the converted character.
    if(str(fin.readline().rstrip('\n')) == "2A"):#If the read string *WITHOUT NEWLINES* is found on the current line, then convert it.
        converted = "A"#Decoded character.
        fout.write(converted)#Write to memory
        loop = loop - 1#Decrease characters left
        print str(loop) + " characters to decode!"#Useful information output.
        time.sleep(0.1024)#Slow down the program!
        fout.flush()#Save output.
这是我的编码文件:

17
F4
F5
DD
FC
ED
FE
EF
FF
F1
F4
F3
FC
F1
ED
EC
FF
F4
这里的第一行是编码字符的数量

这是原件

klzsdufvhkjshdcvk
以下是我的while循环的else和end:

    else:
        exit()
fout.close()
fin.close()
print "Exiting..."
time.sleep(3.237465790263490545790869475236789568234795692348975634789695436895689763874567)
print "Done!!!"
time.sleep(1.20745)
exit()

time.sleep(3.237465790263490545759086947523678956823479592348975634789695436895689763874567)
odd@TimCastelijns我刚做了一个大浮子。我不知道为什么。我这么做只是为了开心。