ValueError: must have exactly one of create/read/write/append mode

时间:2020-05-11 23:25:08   收藏:0   阅读:79

ValueError: must have exactly one of create/read/write/append mode

 

fo = open(‘runoob.txt‘, ‘rw+‘)

python 中文件打开操作的mode中没有“rw”

合法的mode有:

r、rb、r+、rb+、w、wb、w+、wb+、a、ab、a+、ab+




评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!