Menu

[solved] – Question 79943

2.5 points
2.5 points
Consider the following lines of Python code.

x = [13,4,17,1000]
w = x[1:]
u = x[1:]
y = x
u[0] = 50
y[1] = 40
Which of the following is correct?

1) x[1] == 40, y[1] == 40, w[0] == 50, u[0] == 50
2) x[1] == 4, y[1] == 40, w[0] == 4, u[0] == 50
3) x[1] == 50, y[1] == 50, w[0] == 50, u[0] == 50
4) x[1] == 40, y[1] == 40, w[0] == 4, u[0] == 50

Expert Answer


OR


Leave a Reply

Your email address will not be published. Required fields are marked *