From 31f617d4aa91f67eae2d1ded07ff91a2b532162f Mon Sep 17 00:00:00 2001 From: Chandan Rai Date: Sat, 2 Sep 2017 17:39:50 +0530 Subject: [PATCH] corrected typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bd550e2..6e6118f 100755 --- a/README.md +++ b/README.md @@ -1375,7 +1375,7 @@ The midnight time is not printed. #### 💡 Explanation: -Before Python 3.5, the boolean value fo `datetime.time` object was considered to be `False` if it represented midnight in UTC. It is error-prone when using the `if obj:` syntax to check if the `obj` is null or some equivalent of "empty." +Before Python 3.5, the boolean value for `datetime.time` object was considered to be `False` if it represented midnight in UTC. It is error-prone when using the `if obj:` syntax to check if the `obj` is null or some equivalent of "empty." --- @@ -1547,7 +1547,7 @@ a, b = a[b] = {}, 5 * Few weird looking but semantically correct statements: + `[] = ()` is a semantically correct statement (unpacking an empty `tuple` into an empty `list`) + `'a'[0][0][0][0][0]` is also a semantically correct statement as strings are iterable in Python. - + `3 --0-- 5 == 8` and `--5 == 5` are both semantically correct statments and evalute to `True`. + + `3 --0-- 5 == 8` and `--5 == 5` are both semantically correct statements and evaluate to `True`. * Python uses 2 bytes for local variable storage in functions. In theory, this means that only 65536 variables can be defined in a function. However, python has a handy solution built in that can be used to store more than 2^16 variable names. The following code demonstrates what happens in the stack when more than 65536 local variables are defined (Warning: This code prints around 2^18 lines of text, so be prepared!): ```py