什么是python关键字"with"用于?
示例来自:http://docs.python.org/tutorial/inputoutput.html
>>> with open('/tmp/workfile', 'r') as f: ... read_data = f.read() >>> f.closed True
python
python ×1