Computer Science, asked by melvinsam6225, 1 month ago

l1=[1,11,21,31]
l2=l1+2
l3=l1*2
id=l1.index(50)

Answers

Answered by stpartha
0

Answer:

2nd line:      l2=l1+[2]

4th line:       id=l1.index(11)

Explanation:

In list concatenation, both the terms must be lists.

Hence, in line 2, 2 should be [2].

Also, in line 4, index method works if an object is given as argument.

Hence, any of 1 or 11 or 21 or 31 can be given and the output will be the respective index.

Hope this was helpful. Thank you.

Similar questions