Use pass when Python requires an indented statement block but the intended action is to do nothing. It is useful in an except OSError clause when the error should be ignored, though silently swallowing broad or unspecified exceptions makes debugging difficult. section 11.15
Iterating to the final file line
A loop can use pass when its purpose is only to leave the final assigned line available afterward: for one_line in open(filename): pass; print(one_line). This works through the loop's assignment side effect, although assigning directly to final_line is clearer. section 6.3
for one_line in open(filename):
pass
print(one_line)
Inspect the compact example showing pass used as an empty file-iteration body. section 6.3

