I have these dictionaries defined
SustantivoMS = {#diccionario sustantivo masculino singular
'perro':'PERRO',
'gato':'GATO',
'arbol':'ARBOL'
}
ArticuloMS = {#diccionario para articulos masculinos singular
'el':'EL',
'un':'UN'
}
and this way of virificar the combinations of noun and article
cont = 0
for articuloms in ArticuloMS:
for sustms in SustantivoMS:
if (ArticuloMS[articuloms] == oracion[0] and SustantivoMS[sustms] == oracion[1]):
cont = 1
break
I would like to know if this mode can be simplified in a list comprehension, I do not manipulate them very well
the sentence is a list may well be
oracion=['EL','PERRO'] como ejemplo, pero claro son palabras del diccionario