in python the output for x=4 y=x+1 x=2 print (x,y) will be
Answers
Answered by
5
2, 5
x was mutated to 2 while y refers to the value of the original x + 1
Answered by
2
Question:
x=4
y=x+1
x=2
print(x,y)
____________
Output:-
2 5
____________
Explanation:
Given, x=4
y=x+1
>>>y=4+1=5
So y is 5
Now x's new value is 2
print(x,y) will print x and y with space
Similar questions