How do I remove alphanum and numbers elements in a list? Below code is not removing, what am I doing wrong here? After research in other stackoverflow, they are removing characters but not the elements itself.
ls = ['1a', 'b3', '1.45','apples','oranges','mangoes']
cleaned = [x for x in ls if x is not x.isalnum() or x is not x.isdigit()]
cleaned
result = re.sub(r'[^a-zA-Z]', "", ls)
print(result) #expected string or bytes-like object
output should be:
['apples','oranges','mangoes']
enter code here