SyntaxFix
Write A Post
Hire A Developer
Questions
You can stop the 2-line separation in the output by using
with open('t.ini') as f: for line in f: print line.strip() if 'str' in line: break