Computer Science, asked by gaurika725, 3 months ago

Suppose List1 is [40,70,20,1,2], What is the output of?

(a) List1[:-3]

(b) List1[-4:]​

Answers

Answered by bhumilokhande532
0

Answer:

it might be this answer

Explanation:

List1[-4]

Answered by DARK1238DEVIL
0

Answer:

a)[40,70]

b)[70,20,1,2]

Explanation:

a) start from the reverse order of the list count as(-1):

-1=2

-2=1

-3=20   (Exclude the last  number also)

because it is stating from [0:-3}

and remaining will be your answer

b)

-1=2

-2=1

-3=20

-4=70 (Include these number also)

because it is stating from [-4:]

and along with the value remaining 20,1,2 will be the answer

Similar questions