
Python Functions
Lambda
1 |
fn = lambda x: x**3 |
Declare Function
1 |
def (): |
Get Function Name
1 |
## First Declare a function |
Document a Function
1 |
## Document a function with three single quotes |
Arguments
1 |
def multiply(a, b=0): ## b is 0 by default |
Generator
1 |
def count(start, step): |
Decorator
1 |
from functools import wraps |




近期评论