0

PYTHON

Consider the following lines of Python code. a = 'nptel' b = [12,14,16] c = 72 x = [a,b,c] y = [a,b[:],c] u = x[:] v = y b = [12,17,16] v[1][1] = 15 Which of the following is correct? x[1][1] == 14, y[1][1] == 14, u[1][1] == 15, v[1][1] == 15 x[1][1] == 17, y[1][1] == 15, u[1][1] == 14, v[1][1] == 15 x[1][1] == 17, y[1][1] == 15, u[1][1] == 17, v[1][1] == 15 x[1][1] == 14, y[1][1] == 15, u[1][1] == 14, v[1][1] == 15

18th Feb 2018, 5:35 PM
saikat roy chowdhury
saikat roy chowdhury - avatar
1 Answer
+ 1
x[1][1] == 14, y[1][1] == 15, u[1][1] == 14, v[1][1] == 15
18th Feb 2018, 5:47 PM
Obbu
Obbu - avatar