T> Do I need to close the file in this case? Why or why not? T> for line in file('foo', 'r'): T> print line No. The magic of reference counting. S