my_list = ['1 ab ac bbba','23 abcba a aabb ab','345 ccc ab aaaaa']
I'm trying to get rid of the numbers and the spaces, basically everything that's not an 'a','b', or 'c'
I tried this but it didn't work and I'm not sure why:
for str in my_list:
for i in str:
if i != 'a' or 'b' or 'c':
i = ''
else:
pass
I want to eventually get:
my_list2 = ['abacbbba','abcbaaaabbab','cccabaaaaa']