I need to subtract the last element and buid a vector like [1,1,1,...]
. I have this function:
def vectores(lista):
r=[]
for e in lista:
r.append(e[2])
return r
where
lista = [['pintor', 'NCMS000', 1], ['ser', 'VSIS3S0', 1], ['muralista', 'AQ0CS0', 1], ['diego_rivera', 'NP00000', 1], ['frida_kahlo', 'NP00000', 1], ['caso', 'NCMS000', 1]]
But the function is returning [1]
; what can I do?