Post

@PythonPr Answer: B: [1,4,3]
x = [1,2,3]: A list object is created in memory, and the variable x is assigned as a reference to this list.
y = x: This does not create a copy of the list. Instead, it makes the variable y point to the same list object in memory that x points to.
English

@PythonPr • x = [1, 2, 3] → x is a list.
• y = x → y is a reference to the same list object as x.
• y[1] = 4 → This modifies the second element of the list (index 1) to 4.
• Since x and y point to the same list, the change is reflected in both.
Correct Answer
B: [1, 4, 3]
English

@PythonPr B. [1,4,3] since x and y are pointing to the same object. A change in the original list by either x or y will be reflected in the output of either.
English

@PythonPr Is B
y [1] changes the second element of the list to 4... the output will be: [1, 4, 3]
English

@PythonPr Option B
Because the expression y[1] =4 is updating the element at index 1 which is 2 to 4
English
















