python输入2个变量的值,交换这2个变量的值后输出。
Input (x,y):2,3
Output (x,y):3,2
关于#python#的问题:交换这2个变量的值后输出(相关搜索:python输入)
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
threenewbee 2024-09-04 09:02关注print("Input (x,y):", end='') s = input().split(',') revs = ",".join(s[::-1]) print("Output (x,y):" + revs)本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报 编辑记录