Computer Science, asked by phaddy9472, 1 year ago

Is x, y = 5, 6 a valid statement?

Answers

Answered by anshikaverma29
1

Yes, it is a valid statement.

In python, we can assign values to variables in this way too.

Also, if we want to swap the values we can use a similar statement, i,e;

If, x=5

   y=8

x,y= y,x

After this if we print the values of x and y then it would come to be x=8 and y=5.

Similar questions