单项选择题
在Python中,如何向一个已存在的文件中写入数据?()
A.open(file,’a’)
B.open(file,’w’)
C.open(file,’r+’)
D.A和C都对
点击查看答案&解析
相关考题
-
单项选择题
在Python中,如何将一个字符串分割成列表?()
A.str.split(sep)
B.str.divide(sep)
C.split(str,sep)
D.list(str,sep) -
单项选择题
在Python中,如何判断一个列表是否为空?()
A.len(list)==0
B.list.isEmpty()
C.not list
D.A和C都对 -
单项选择题
在Python中,如何获取字符串的子串?()
A.str[start:end]
B.str.sub(start,end)
C.str.slice(start,end)
D.str.substring(start,end)
