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

Posted 天玑

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ValueError: must have exactly one of create/read/write/append mode相关的知识,希望对你有一定的参考价值。

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+




以上是关于ValueError: must have exactly one of create/read/write/append mode的主要内容,如果未能解决你的问题,请参考以下文章

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

ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 1

pandas apply返回多列时出错ValueError: Must have equal len keys and value when setting with an iterable解决方案

pandas apply返回多列时出错ValueError: Must have equal len keys and value when setting with an iterable解决方案

must/ must't / have to/ don't have to

Must and have to 的用法