python - Take only letters from string elements -


i have long list this: a = ['abcd 123', 'efhgh 345', 'dhasadjkhdk 23']

how can letters part without numbers , make them list?

>>> [''.join([l l in x if l.isalpha()]) x in xs] ['abcd', 'efhgh', 'dhasadjkhdk'] 

Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -