python 解决 TypeError: 'encoding' is an invalid keyword argument for this function

会报错
python 解决 TypeError: 'encoding' is an invalid keyword argument for this function_第1张图片
解决办法

import io

 withio.open('xiaoxi.txt','a', encoding='utf-8')asf:

你可能感兴趣的:(python 解决 TypeError: 'encoding' is an invalid keyword argument for this function)