Post

@PythonPr Answer: (A) 20
The code demonstrates how variable assignment works with mutable objects (like lists) in Python.
a = [10, 20, 30] creates a list object [10, 20, 30] and assigns the variable a to reference this object in memory.
b = a does not create a new list.
English

@PythonPr Answer: A) 20
Step by step:
› a = [10, 20, 30] creates list
› b = a makes b point to same list
› a = [40, 50] reassigns a to NEW list (b unchanged!)
› b still points to [10, 20, 30]
› b[1] = 20
For beginners: Reassignment breaks the connection between variables!
English

@PythonPr Output A) 20
b = a makes b reference the original list [10, 20, 30].
Reassigning a to [40, 50] creates a new list and doesn’t affect b.
So b[1] is still 20.
English























