为什么我这个判断str1字符串的无法正常工作,只有i进行了判度胺,在输出时我看到str1也输出了,if和break没用生效
str1 = "Disassembly of section .config_addr:"
def parse_dump():
i=-20
print("parse dump ")
with open('ape.dump', 'r') as txt1:
while 1:
content = txt1.readline()
print ("content",content)
if content == str1:
print ("content",content)
break
i = i+1
if i==20:
break