From e987a4efbd27d19cb9b85e0647b7263f592d1e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 25 Dec 2018 19:44:51 +0100 Subject: [PATCH] Random --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2b643f4..c4fe840 100644 --- a/README.md +++ b/README.md @@ -372,12 +372,12 @@ shuffle() Datetime -------- ```python -import datetime -now = datetime.datetime.now() +from datetime import datetime, strptime +now = datetime.now() now.month # 3 now.strftime('%Y%m%d') # '20180315' now.strftime('%Y%m%d%H%M%S') # '20180315002834' - = datetime.strptime('2015-05-12 00:39', '%Y-%m-%d %H:%M') + = strptime('2015-05-12 00:39', '%Y-%m-%d %H:%M') ```