Consider the following code:
a=[1,2,3]
a[1]=4 What is a?
This code contains an error.
[1,2,3]
[1,2,3,1]
[4,2,3]
[1,4,3]
Answers
Answered by
1
Answer:
a[1]=[1,4,3].
explanation:
[1,4,3] contains three characters ( length)
according to the formula,
length=len(a)-1
here,
the length is 3
and if we subtract it with 1 we get two
.
now, according to numbers we start from zero
[0,1,2]=[1,2,3]
if we give a[1]=4
then it affects 2 and it changes to 4
so we get,
a=[1,4,3]
note: if you like my explanation mark me as brainly.thank you
Similar questions
Political Science,
5 months ago
English,
5 months ago
Physics,
10 months ago
Math,
10 months ago
English,
1 year ago