0
Could someone please explain how the answer (which is 2) was achieved?
l = ['3', '2', '1'] print(l.index('1')*3-4
3 Answers
+ 1
I.index('1')Ă3-4 = 2*3-4 = 6-4 = 2
0
The index of '1' in the list is 2.
This * 3 == 6.
Minus 4 == 2.
0
ooh, thank you