第16427题 单选题
计算字符串S中字符'o'出现次数的正确Python语句是哪项?

现有字符串S = "No mountain is more high than one.",需要计算并输出字符串中'o'的出现次数。

A
print(S.find('o',1))
B
print(S.index('o'))
C
print(S.index('o',0,len(S)))
D
print(S.count('o'))
程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析