Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

函数与参数

  • 函数通过 def 定义,可返回一个或多个值。
  • 参数支持位置参数、关键字参数、默认值与可变参数。
  • 匿名函数使用 lambda,适合短小表达式。