Python Functions Swapping of numbers

后端 未结 0 395
鱼传尺愫
鱼传尺愫 2021-02-01 11:08

If we write a simple program in python as mentioned below, the variables get swapped

num1=5

num2=10

temp = num1

num1 = num2

相关标签:
回答
  • 消灭零回复
提交回复
热议问题