2024-10-06 11:17:17 发布
网友
def anti_vowel(text): for c in text: if c == "e": c = "2" return text print anti_vowel("ee2ee")
为什么打印的是“ee2ee”,而不是“22222”?你知道吗
我说,每当“e”出现时,就换成“2”。你知道吗
我真的不明白。你知道吗
通过将字符连续复制到c中,可以循环text。 你只会改变c。你知道吗
c
text
c = "2"
在返回它之前,没有任何东西会改变text。你知道吗
通过将字符连续复制到
c
中,可以循环text
。你只会改变
c
。你知道吗在返回它之前,没有任何东西会改变
text
。你知道吗相关问题 更多 >
编程相关推荐