I keep getting an indentation error and I have no idea what keeps causing it. Sometimes I delete spaces, tab the exact same way, and it gives an indentation error for the for loop. My code is below. Thanks.
def censor(text, word): new_list = text.split() for i in new_list: if i == word: position = new_list.index(i) del(new_list[position]) new_list.insert(position, ['*']*len(i)) newer_list = " ".join(new_list) return newer_list