How to remove all non-numeric characters (except operators) from a string in Python?
How to remove all non-numeric characters (except operators) from a string in Python? Question: I would like to remove all non-numeric characters from a string, except operators such as +,-,*,/, and then later evaluate it. For example, suppose the input is ‘What is 2+2?’ The result should be ‘2+2’ – keeping only the operator symbols …