- 博客(0)
- 资源 (1)
- 收藏
- 关注
可爱的Python之 交换值
问题
You want to swap the values of some variables, but you don't want to use a temporary variable.
你想去交换一些变量的值,但是你不想使用临时变量。
解决
Python's automatic tuple packing and unpacking make this a snap:
python的自动tuple打包和解包可以做到这点:
2011-03-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人