python 元组拾遗
python语法糖- def printall(*args):
- return args
一个以 * 开头的参数将参数聚集为一个元组。
printall函数可以接收任意个数的参数,并打印它们。
聚集的参数可以取任何你喜欢的名字,但是习惯上使用 args。
来源: http://www.bubuko.com/infodetail-1994005.html
与本文相关文章
- 说说 Python 元组
- Python 数据类型 - 5 元组
- python_列表/元组/元组列表以及如何使用
- python 之路 3 - 元组, 列表, 字典, 集合
- Python 第二周之字符串, 列表, 元组, 集合, 字典
- PYTHON 元组 TUPLE(不可变)
- Python 之 tuple 元组详解
- 区别 Python 中的列表, 元组, 字典, 集合