Censor ... My code is correct but I still recieve an error message


My code is correct but it still says I am doing it wrong .. what do u think should I do ?

def censor(text,word):
for i in range(0 , len(text.split())):
JAR.append(" ")
for index in range(0, len(JAR)):
if JAR[index] == word:
JAR[index]= "*" * VAE
return "".join(JAR)


That certainly will not run, perhaps you posted something different from what you're running yourself, that's a problem if it's that other code that you wish to discuss.

If you're asking about an error message, then you will need to include that error message, just the fact that it exists doesn't contain the information of what it is saying. If at all possible, then also explain how to reproduce that, because a problem that can't be reproduced is not a problem, because it doesn't happen.


Thanks for reply I actually Fixed it .. I just had to delete an empty space at the end of the sentence and Voila ! :slight_smile:

Thanks alot though


2 posts were split to a new topic: Censor