第27122题 单选题
下列关于以下Python代码的运行结果描述,正确的是?
test_str = "python"
# 尝试通过索引修改字符串字符
test_str[] = "P"
print(test_str)
A

代码正常运行,输出Python

B

代码正常运行,输出python

C

运行时抛出TypeError: 'str' object does not support item assignment

D

运行时抛出NameError: name 'test_str' is not defined

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