<p>我是一个初学者,我在Codecademy上做了一个练习,解决方法是:</p>
<pre><code> def censor(text, word):
words = text.split()
result = ''
stars = '*' * len(word)
count = 0
for i in words:
if i == word:
words[count] = stars
count += 1
result =' '.join(words)
return result
</code></pre>
<p>所以我的问题是第8行的单词[count]=stars是什么意思?你知道吗</p>