Browse Source

Arguments

pull/3/head
Jure Šorn 7 years ago
parent
commit
e2b6de1954
1 changed files with 2 additions and 2 deletions
  1. 4
      README.md

4
README.md

@ -286,7 +286,7 @@ func(*args, **kwargs)
func(1, 2, x=3, y=4, z=5) func(1, 2, x=3, y=4, z=5)
``` ```
**Splat operator can also be used in function declarations:** #### Splat operator can also be used in function declarations:
```python ```python
>>> def add(*a): >>> def add(*a):
... return sum(a) ... return sum(a)
@ -294,7 +294,7 @@ func(1, 2, x=3, y=4, z=5)
6 6
``` ```
**And in some other places:** #### And in some other places:
```python ```python
>>> a = (1, 2, 3) >>> a = (1, 2, 3)
>>> [*a] >>> [*a]

|||||||
100:0
Loading…
Cancel
Save