mutable_objects.md
April 15, 2022 ยท View on GitHub
Mutable Objects
- What would be the output of the following program? explain
x = [1, 2 ,3]
y = x
print(x)
print(y)
x[0] = 0
print(x)
print(y)
Solution
Click here to view the solution
April 15, 2022 ยท View on GitHub
x = [1, 2 ,3]
y = x
print(x)
print(y)
x[0] = 0
print(x)
print(y)
Click here to view the solution