How to do a SIMPLE subtraction w/ Python in arrays with 3 variables.
a = [[8,8,1] , [6,4,1]]
b = a[0][1] - a [1] [0]
c = a[1:b]
print (c)
Is this the answer as it is simply outputting the 2nd array from a
?
Simply typing out the array according to instruction but not understanding how a[1:b]=[6,4,1]
? Is 1
= to the 2nd array of 6,4,1
or is it indicating the 2nd array in a
? For the b
variable is the subtraction just keeping the first line of a = 8,8,1 , 6,4,1
the same so that [1:b]
= the 2nd index of a
?