1
Good afternoon, I have the following problem, I have to write a function that receives a dictionary and a subject and print all the dependencies of the subject for example :
dependencias_complicado = {
'geometria_diferencial' : [ 'análise_complexa', 'topologia' ],
'análise_complexa' : [ 'análise_real' ],
'análise_real' : [ 'cálculo1' ]
}
the result would be :
cálculo1
análise_real
análise_complexa
topologia
at the moment the code is like this :
def mostra_dependencias(dicionario, materia):
for x in dicionario.get(materia):
print(x)
what returns me only : [ 'analise_complexa', 'topologia' ]
Why the result would be
cálculo1
,'análise_real
,análise_complexa
,topologia
? And what entrance would this exit generate?– Woss