第19072题 单选题
执行给定Python字符串replace操作代码的运行结果是?
str1 = "cat dog cat dog cat dog"
str2 = str1.replace("cat", "mouse", 2)
print(str2)
A

cat dog mouse dog cat dog

B

2 dog mouse dog cat dog

C

mouse mouse dog mouse mouse dog cat dog

D

mouse dog mouse dog cat dog

程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析