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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -