[Solved] Remove parenthesis and numbers from names?


You may use regular-expression for the same. Here is an approach to do the same

import re
pattern = '[a-zA-Z]+'
country = ['India12','Bolivia (SA)', 'Australia17 (A)']
country_names = map(lambda x:re.search(pattern,x).group(),country)

0

solved Remove parenthesis and numbers from names?