I have a list of symbols that I want to replace by spaces in a string. Here is my code:
useless = ['.', ',', '!', '?', ':', '(', ')', '"', '[', ']']
message = 'Whatever. you; "want:)'
for sign in useless:
while message.find(sign):
message.replace(sign, ' ')
This results in an infinite loop that never stops. It's probably something easy but I'm on it for quite a long time now.. Any help would be great, thank you.