Unpacking Argument Lists

  The reverse situation occurs when the arguments are already in a list or tuple but need to be unpacked for a function call requiring separate positional arguments. For instance, the built-in range()function expects separate start and stop arguments. If they are not available separately, write the function call with the *-operator to unpack the arguments out of a list or tuple:

  

  In the same fashion, dictionaries can deliver keyword arguments with the **-operator:

  

参考:http://docs.python.org/2.7/tutorial/controlflow.html#unpacking-argument-lists

最新文章

  1. sqlserver中DATE类型的数据转化 CONVERT
  2. eclipse的包的加减号展开方式
  3. 统计Codec RAM和ROM方法
  4. JS常用的设计模式(17)—— 状态模式
  5. 网络流量监控shell脚本
  6. JavaScript 中的算术运算
  7. MongoDB - The mongo Shell, Access the mongo Shell Help
  8. 【CSS3】---background-origin background-clip background-size
  9. Lucas定理的理解与应用
  10. Axis2 WebService(基于REST风格)
  11. Element ui 日期限制范围
  12. LVS负载均衡基础介绍及NET、DR模式配置
  13. css居中小技巧
  14. 下载m3u8视频
  15. 运行vs2010,Debug时发生“无法启动程序"http://localhost:xxx",系统找不到指定文件
  16. 使用Arduino模块实施无线信号的重放攻击
  17. CountDownLatch的简单理解
  18. openstack系列文章(二)
  19. mysql 截取字符串
  20. Django分页的实现

热门文章

  1. json.dumps与json.dump的区别 json.loads与json.load的区别(简洁易懂)
  2. CentOS下Docker的安装及国内镜像配置
  3. IE8下的typeof(console.log)为"object"的BUG
  4. jQuery - 左右拖动分隔条
  5. 第33课 main函数与命令行参数
  6. selenium-java,暂停功能
  7. MySQL 主从复制与读写分离
  8. 注册dll文件
  9. Git 学习记录一
  10. box2d试用