with open('/etc/passwd') as a:
    with open('/etc/group') as b:
        with open('/etc/shadow') as c:
            for lines in zip(a, b, c):
                pass
дзен Python vs с утверждением — философские размышления