I have the following list:
L = [('carga', 'NCFS000', 'superior', 'AQ0CS0'),('carga', 'NCFS000', 'frontal', 'AQ0CS0')]
How can remove 'NCFS000', 'AQ0CS0'
and the square brackets?, something like this:
[('carga', 'superior'),('carga', 'frontal')]
This is what i all ready tried:
def remove_values_from_list(the_list, val):
return [value for value in the_list if value != val]
print "Esta es el bigrama final:\n",\
remove_values_from_list(L, 'NCFS000')
But the id still in the list, how can i drop the id´s and get all the words in the desired format?. How can i declare a regex for this task?. Thanks