Reporting Bug Practice Makes Perfect Censor


I want to report a bug, but I dont know where the right place is. This code should fail to pass, yet it passes just fine.

import re

def censor(text, word):
    for i in text:
        string = re.sub(word, '*' * len(word), text)
    return string
text = 'hey hey hey'
word = 'heyl'
print censor(text, word)


the code works fine? It censors when it has to, and doesn't censor when it doesn't have to.

the word you want to censor is heyl, which doesn't occur in text, so everything is fine?


Sorry, I completely forgot I had made this just before. My concern had been adressed in a different question :sweat_smile: