10/15 Censor Solution Question


#1

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:

03%20AM

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!


#2

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


#3

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