|
|
@ -315,14 +315,11 @@ random.shuffle(<list>) |
|
|
|
Datetime |
|
|
|
-------- |
|
|
|
```python |
|
|
|
>>> import datetime |
|
|
|
>>> now = datetime.datetime.now() |
|
|
|
>>> now.month |
|
|
|
3 |
|
|
|
>>> now.strftime('%Y%m%d') |
|
|
|
'20180315' |
|
|
|
>>> now.strftime('%Y%m%d%H%M%S') |
|
|
|
'20180315002834' |
|
|
|
import datetime |
|
|
|
now = datetime.datetime.now() |
|
|
|
now.month # 3 |
|
|
|
now.strftime('%Y%m%d') # '20180315' |
|
|
|
now.strftime('%Y%m%d%H%M%S') # '20180315002834' |
|
|
|
``` |
|
|
|
|
|
|
|
Arguments |
|
|
|