10/15 Censor Solution Question


I can usually make sense of each line of code when i hit “Solution”, but for this problem, I cant make sense of what the ‘count’ variable is doing:


why purpose does word[count] serve?
and why do we need to add 1 to it after each loop?

any help is greatly appreciated. thanks!


updates the list using count as index.

we need to update the index each iteration of the loop, otherwise we update the wrong the element of the list


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.