文件读写读文件:read()会一次性读取全部内容 with 和 try…catch一样,更简介,自动调用close方法12with open('/path/to/file', 'r') as f: print(f.read())