Browse Source

Update

pull/3/head
Jure Šorn 5 years ago
parent
commit
95588520a0
1 changed files with 6 additions and 0 deletions
  1. 6
      README.md

6
README.md

@ -68,6 +68,8 @@ dict(zip(keys, values)) # Initiates a dict from two lists.
>>> z = ['blue', 'red', 'blue', 'yellow', 'blue', 'red'] >>> z = ['blue', 'red', 'blue', 'yellow', 'blue', 'red']
>>> Counter(z) >>> Counter(z)
Counter({'blue': 3, 'red': 2, 'yellow': 1}) Counter({'blue': 3, 'red': 2, 'yellow': 1})
>>> <counter>.most_common()[0][0]
'blue'
``` ```
Set Set
@ -322,6 +324,10 @@ now.strftime('%Y%m%d') # '20180315'
now.strftime('%Y%m%d%H%M%S') # '20180315002834' now.strftime('%Y%m%d%H%M%S') # '20180315002834'
``` ```
```python
<datetime> = datetime.strptime('2015-05-12 00:39', '%Y-%m-%d %H:%M')
```
Arguments Arguments
--------- ---------
**"*" is the splat operator, that takes a list as input, and expands it into actual positional arguments in the function call:** **"*" is the splat operator, that takes a list as input, and expands it into actual positional arguments in the function call:**

Loading…
Cancel
Save