human
Python remove anything that is not a letter or number
assistant
Here is some code to replace everything that is not an alphabet or a digit with '' in 's'.

re.sub('[\\W_]+', '', s)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.