+ 1
Why output is 7
a = [(1,0)[2,3,1],{1:'a',4:'b'}] lst = [] for n in a: lst.extend(n) print(len(lst)) #output 7
2 Respuestas
+ 5
Because its 7 elements in list
1 0 2 3 1 a b
+ 1
You could have checked yourself as well ,print is a very useful function ,if you don't understand something ,using print to see the output after a step and try to understand it
Like in the example above place a print(lst) statement after lst.extend