Answer to Question #134852 in Python for santosh kasyap

Question #134852
Consider the following lines of Python code.

b = [23,44,87,100]
a = b[1:]
d = b[2:]
c = b
d[0] = 97
c[2] = 77
Which of the following holds at the end of this code?

a[1] == 77, b[2] == 77, c[2] == 77, d[0] == 97
a[1] == 87, b[2] == 87, c[2] == 77, d[0] == 97
a[1] == 87, b[2] == 77, c[2] == 77, d[0] == 97
a[1] == 97, b[2] == 77, c[2] == 77, d[0] == 97
1
Expert's answer
2020-09-25T11:19:59-0400

a[1] == 87, b[2] == 77, c[2] == 77, d[0] == 97

Only this will hold.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS