Why is the answer to this Python Challenge Error? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why is the answer to this Python Challenge Error?

A = [1 , 2] B = [3 , 4] C = A.extend(B) print(C[3])

31st May 2020, 2:38 AM
Jeriah Cohen
Jeriah Cohen - avatar
2 Answers
+ 2
You added [3,4] to A so A is extended. Therefore Print A[ ] A = [1 , 2] B = [3 , 4] C = A.extend(B) print(A[3]) #And try A[0], A[1], A[2]
31st May 2020, 3:01 AM
Muhammadamin
Muhammadamin - avatar
0
Try to run below for extend help. You will get the answer. print(help([].extend))
31st May 2020, 4:38 AM
$ยข๐Žโ‚น๐”ญ!๐จ๐“
$ยข๐Žโ‚น๐”ญ!๐จ๐“ - avatar