with open('com1', 'r') as f:

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sat Apr 4 00:58:23 CEST 2009


In message <8bc55c05-19da-41c4-
b916-48e0a4be49b9 at p11g2000yqe.googlegroups.com>, gert wrote:

>     with open('com1', 'r') as f:
>         for line in f:
>              print('line')

Why bother, why not just

    for line in open('com1', 'r') :
        print line





More information about the Python-list mailing list