1.五道python设计题
两个数字交换
a = 1
b = 0
a = a + b
b = a - b
a = a - b
print(a, b)
a = 1
b = 0
temp = a
a = b
b = temp
print(a, b)
a = 1
b = 0
b, a = a, b
print(a, b)
a = 1
b = 0
a = a ^ b
b = a ^ b
a = a ^ b
print(a, b)
3.python环境变量如下图
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)