s = "fff555#$%^"
f =filter(str.isalpha, s)
print("f", f)
I thought I could iterate over s and filter each character in s by str.isalpha function.
I do not want to use regex.
You want to join after filtering, as filter returns a generator.
s = "fff555#$%^"
f = ''.join(filter(str.isalpha, s))
print("f", f)
filter changed in Python 3. See the Python 3 docs.