You could use re, but you don’t really need to.
>>> s="as32{ vd"s k!+"
>>> ''.join(x for x in s if x.isalpha())
'asvdsk'
>>> filter(str.isalpha, s) # works in python-2.7
'asvdsk'
>>> ''.join(filter(str.isalpha, s)) # works in python3
'asvdsk'
You could use re, but you don’t really need to.
>>> s="as32{ vd"s k!+"
>>> ''.join(x for x in s if x.isalpha())
'asvdsk'
>>> filter(str.isalpha, s) # works in python-2.7
'asvdsk'
>>> ''.join(filter(str.isalpha, s)) # works in python3
'asvdsk'