Why the output is 1 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why the output is 1

Here is the thing, I am not sure why the output is 1 list1=[2,4,6] list2=[1,2,3] x=list1+list2 print(x[3]) any idea why one is correct? is it 1 because 2 is index0 4 is index 1 6 is index 2 1 is index 3?

19th Nov 2019, 6:13 PM
THEGreatGatsby
THEGreatGatsby - avatar
2 Answers
+ 4
2,4,6,1,2,3 0,1,2,3 1 is in the index 3.
19th Nov 2019, 6:19 PM
Bahhaⵣ
Bahhaⵣ - avatar
+ 1
thanks
19th Nov 2019, 6:17 PM
THEGreatGatsby
THEGreatGatsby - avatar