Python基础–19 文章目录 Python基础--19with语句os模块的常用函数os.path模块的常用方法 with语句 with open('logo.png','rb') as src_file: with open('copy2logo.png','wb') as target_file: target_file.write(src_file.read()) os模块的常用函数 os.path模块的常用方法