Usar una lista de listas en una función


#1



me marca error en las lineas 6 y 12 y dice que 'resultado' no está definido.


n = [[1, 2, 3], [4, 5, 6, 7, 8, 9]]
def combinar(listas):
    resultados = []
    for q in n:
        for w in q:
            q.append(combinar)
    return resultados
    # Agregá acá tu función




print combinar(n)


#2

Did you mean to write,

for q in listas:

?

Did you mean to write,

resultados.append(w)

?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.