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
Post a Comment