I have a phone number(string), e.g. \"+123-456-7890\", that I want to turn into a list that looks like: [+, 1, 2, 3, -, ...., 0].
Why? So I can go iterate through t
You can use the re module:
import re re.sub(r'\D', '', '+123-456-7890')
This will replace all non-digits with ''.